import unittest

from ..asert_daa import ASERTDaa


class TestASERTDaa(unittest.TestCase):
    def validate_blocksequence(self, anchor_height, ref_time, ref_bits, blocks):
        asert = ASERTDaa()
        for block in blocks:
            height, time, target = block

            t_delta = time - ref_time
            h_delta = height - anchor_height
            self.assertEqual(
                target, asert.next_bits_aserti3_2d(ref_bits, t_delta, h_delta)
            )

    # Steady 600s blocks at POW limit target
    def test_steady_at_pow_limit(self):
        blocks = [
            (1, 600, 0x1D00FFFF),
            (2, 1200, 0x1D00FFFF),
            (3, 1800, 0x1D00FFFF),
            (4, 2400, 0x1D00FFFF),
            (5, 3000, 0x1D00FFFF),
            (6, 3600, 0x1D00FFFF),
            (7, 4200, 0x1D00FFFF),
            (8, 4800, 0x1D00FFFF),
            (9, 5400, 0x1D00FFFF),
            (10, 6000, 0x1D00FFFF),
        ]
        self.validate_blocksequence(1, 0, 0x1D00FFFF, blocks)

    # Steady 600s blocks at arbitrary non-limit target 0x1a2b3c4d
    def test_steady_at_arb_non_limit(self):
        blocks = [
            (1, 600, 0x1A2B3C4D),
            (2, 1200, 0x1A2B3C4D),
            (3, 1800, 0x1A2B3C4D),
            (4, 2400, 0x1A2B3C4D),
            (5, 3000, 0x1A2B3C4D),
            (6, 3600, 0x1A2B3C4D),
            (7, 4200, 0x1A2B3C4D),
            (8, 4800, 0x1A2B3C4D),
            (9, 5400, 0x1A2B3C4D),
            (10, 6000, 0x1A2B3C4D),
        ]
        self.validate_blocksequence(1, 0, 0x1A2B3C4D, blocks)

    # Steady 600s blocks at minimum limit target 0x01010000
    def test_steady_at_minimum_limit(self):
        blocks = [
            (1, 600, 0x01010000),
            (2, 1200, 0x01010000),
            (3, 1800, 0x01010000),
            (4, 2400, 0x01010000),
            (5, 3000, 0x01010000),
            (6, 3600, 0x01010000),
            (7, 4200, 0x01010000),
            (8, 4800, 0x01010000),
            (9, 5400, 0x01010000),
            (10, 6000, 0x01010000),
        ]
        self.validate_blocksequence(1, 0, 0x01010000, blocks)

    # From minimum target, a series of halflife schedule jumps, doubling target at each block
    def test_from_min_halflife_jumps_doubling_target(self):
        blocks = [
            (1, 173400, 0x01020000),
            (2, 346800, 0x01040000),
            (3, 520200, 0x01080000),
            (4, 693600, 0x01100000),
            (5, 867000, 0x01200000),
            (6, 1040400, 0x01400000),
            (7, 1213800, 0x02008000),
            (8, 1387200, 0x02010000),
            (9, 1560600, 0x02020000),
            (10, 1734000, 0x02040000),
            (11, 1907400, 0x02080000),
            (12, 2080800, 0x02100000),
            (13, 2254200, 0x02200000),
            (14, 2427600, 0x02400000),
            (15, 2601000, 0x03008000),
            (16, 2774400, 0x03010000),
            (17, 2947800, 0x03020000),
            (18, 3121200, 0x03040000),
            (19, 3294600, 0x03080000),
            (20, 3468000, 0x03100000),
            (21, 3641400, 0x03200000),
            (22, 3814800, 0x03400000),
            (23, 3988200, 0x04008000),
            (24, 4161600, 0x04010000),
            (25, 4335000, 0x04020000),
            (26, 4508400, 0x04040000),
            (27, 4681800, 0x04080000),
            (28, 4855200, 0x04100000),
            (29, 5028600, 0x04200000),
            (30, 5202000, 0x04400000),
            (31, 5375400, 0x05008000),
            (32, 5548800, 0x05010000),
            (33, 5722200, 0x05020000),
            (34, 5895600, 0x05040000),
            (35, 6069000, 0x05080000),
            (36, 6242400, 0x05100000),
            (37, 6415800, 0x05200000),
            (38, 6589200, 0x05400000),
            (39, 6762600, 0x06008000),
            (40, 6936000, 0x06010000),
            (41, 7109400, 0x06020000),
            (42, 7282800, 0x06040000),
            (43, 7456200, 0x06080000),
            (44, 7629600, 0x06100000),
            (45, 7803000, 0x06200000),
            (46, 7976400, 0x06400000),
            (47, 8149800, 0x07008000),
            (48, 8323200, 0x07010000),
            (49, 8496600, 0x07020000),
            (50, 8670000, 0x07040000),
            (51, 8843400, 0x07080000),
            (52, 9016800, 0x07100000),
            (53, 9190200, 0x07200000),
            (54, 9363600, 0x07400000),
            (55, 9537000, 0x08008000),
            (56, 9710400, 0x08010000),
            (57, 9883800, 0x08020000),
            (58, 10057200, 0x08040000),
            (59, 10230600, 0x08080000),
            (60, 10404000, 0x08100000),
            (61, 10577400, 0x08200000),
            (62, 10750800, 0x08400000),
            (63, 10924200, 0x09008000),
            (64, 11097600, 0x09010000),
            (65, 11271000, 0x09020000),
            (66, 11444400, 0x09040000),
            (67, 11617800, 0x09080000),
            (68, 11791200, 0x09100000),
            (69, 11964600, 0x09200000),
            (70, 12138000, 0x09400000),
            (71, 12311400, 0x0A008000),
            (72, 12484800, 0x0A010000),
            (73, 12658200, 0x0A020000),
            (74, 12831600, 0x0A040000),
            (75, 13005000, 0x0A080000),
            (76, 13178400, 0x0A100000),
            (77, 13351800, 0x0A200000),
            (78, 13525200, 0x0A400000),
            (79, 13698600, 0x0B008000),
            (80, 13872000, 0x0B010000),
            (81, 14045400, 0x0B020000),
            (82, 14218800, 0x0B040000),
            (83, 14392200, 0x0B080000),
            (84, 14565600, 0x0B100000),
            (85, 14739000, 0x0B200000),
            (86, 14912400, 0x0B400000),
            (87, 15085800, 0x0C008000),
            (88, 15259200, 0x0C010000),
            (89, 15432600, 0x0C020000),
            (90, 15606000, 0x0C040000),
            (91, 15779400, 0x0C080000),
            (92, 15952800, 0x0C100000),
            (93, 16126200, 0x0C200000),
            (94, 16299600, 0x0C400000),
            (95, 16473000, 0x0D008000),
            (96, 16646400, 0x0D010000),
            (97, 16819800, 0x0D020000),
            (98, 16993200, 0x0D040000),
            (99, 17166600, 0x0D080000),
            (100, 17340000, 0x0D100000),
            (101, 17513400, 0x0D200000),
            (102, 17686800, 0x0D400000),
            (103, 17860200, 0x0E008000),
            (104, 18033600, 0x0E010000),
            (105, 18207000, 0x0E020000),
            (106, 18380400, 0x0E040000),
            (107, 18553800, 0x0E080000),
            (108, 18727200, 0x0E100000),
            (109, 18900600, 0x0E200000),
            (110, 19074000, 0x0E400000),
            (111, 19247400, 0x0F008000),
            (112, 19420800, 0x0F010000),
            (113, 19594200, 0x0F020000),
            (114, 19767600, 0x0F040000),
            (115, 19941000, 0x0F080000),
            (116, 20114400, 0x0F100000),
            (117, 20287800, 0x0F200000),
            (118, 20461200, 0x0F400000),
            (119, 20634600, 0x10008000),
            (120, 20808000, 0x10010000),
            (121, 20981400, 0x10020000),
            (122, 21154800, 0x10040000),
            (123, 21328200, 0x10080000),
            (124, 21501600, 0x10100000),
            (125, 21675000, 0x10200000),
            (126, 21848400, 0x10400000),
            (127, 22021800, 0x11008000),
            (128, 22195200, 0x11010000),
            (129, 22368600, 0x11020000),
            (130, 22542000, 0x11040000),
            (131, 22715400, 0x11080000),
            (132, 22888800, 0x11100000),
            (133, 23062200, 0x11200000),
            (134, 23235600, 0x11400000),
            (135, 23409000, 0x12008000),
            (136, 23582400, 0x12010000),
            (137, 23755800, 0x12020000),
            (138, 23929200, 0x12040000),
            (139, 24102600, 0x12080000),
            (140, 24276000, 0x12100000),
            (141, 24449400, 0x12200000),
            (142, 24622800, 0x12400000),
            (143, 24796200, 0x13008000),
            (144, 24969600, 0x13010000),
            (145, 25143000, 0x13020000),
            (146, 25316400, 0x13040000),
            (147, 25489800, 0x13080000),
            (148, 25663200, 0x13100000),
            (149, 25836600, 0x13200000),
            (150, 26010000, 0x13400000),
            (151, 26183400, 0x14008000),
            (152, 26356800, 0x14010000),
            (153, 26530200, 0x14020000),
            (154, 26703600, 0x14040000),
            (155, 26877000, 0x14080000),
            (156, 27050400, 0x14100000),
            (157, 27223800, 0x14200000),
            (158, 27397200, 0x14400000),
            (159, 27570600, 0x15008000),
            (160, 27744000, 0x15010000),
            (161, 27917400, 0x15020000),
            (162, 28090800, 0x15040000),
            (163, 28264200, 0x15080000),
            (164, 28437600, 0x15100000),
            (165, 28611000, 0x15200000),
            (166, 28784400, 0x15400000),
            (167, 28957800, 0x16008000),
            (168, 29131200, 0x16010000),
            (169, 29304600, 0x16020000),
            (170, 29478000, 0x16040000),
            (171, 29651400, 0x16080000),
            (172, 29824800, 0x16100000),
            (173, 29998200, 0x16200000),
            (174, 30171600, 0x16400000),
            (175, 30345000, 0x17008000),
            (176, 30518400, 0x17010000),
            (177, 30691800, 0x17020000),
            (178, 30865200, 0x17040000),
            (179, 31038600, 0x17080000),
            (180, 31212000, 0x17100000),
            (181, 31385400, 0x17200000),
            (182, 31558800, 0x17400000),
            (183, 31732200, 0x18008000),
            (184, 31905600, 0x18010000),
            (185, 32079000, 0x18020000),
            (186, 32252400, 0x18040000),
            (187, 32425800, 0x18080000),
            (188, 32599200, 0x18100000),
            (189, 32772600, 0x18200000),
            (190, 32946000, 0x18400000),
            (191, 33119400, 0x19008000),
            (192, 33292800, 0x19010000),
            (193, 33466200, 0x19020000),
            (194, 33639600, 0x19040000),
            (195, 33813000, 0x19080000),
            (196, 33986400, 0x19100000),
            (197, 34159800, 0x19200000),
            (198, 34333200, 0x19400000),
            (199, 34506600, 0x1A008000),
            (200, 34680000, 0x1A010000),
            (201, 34853400, 0x1A020000),
            (202, 35026800, 0x1A040000),
            (203, 35200200, 0x1A080000),
            (204, 35373600, 0x1A100000),
            (205, 35547000, 0x1A200000),
            (206, 35720400, 0x1A400000),
            (207, 35893800, 0x1B008000),
            (208, 36067200, 0x1B010000),
            (209, 36240600, 0x1B020000),
            (210, 36414000, 0x1B040000),
            (211, 36587400, 0x1B080000),
            (212, 36760800, 0x1B100000),
            (213, 36934200, 0x1B200000),
            (214, 37107600, 0x1B400000),
            (215, 37281000, 0x1C008000),
            (216, 37454400, 0x1C010000),
            (217, 37627800, 0x1C020000),
            (218, 37801200, 0x1C040000),
            (219, 37974600, 0x1C080000),
            (220, 38148000, 0x1C100000),
            (221, 38321400, 0x1C200000),
            (222, 38494800, 0x1C400000),
            (223, 38668200, 0x1D008000),
            (224, 38841600, 0x1D00FFFF),
            (225, 39015000, 0x1D00FFFF),
        ]

        self.validate_blocksequence(1, 0, 0x01010000, blocks)

    # From POW limit, a series of halflife block height jumps w/o time increment, halving target at each block
    def test_from_pow_limit_series_halflife_block_jumps_w_time_inc_target_halving(self):
        blocks = [
            (2, 0, 0x1D00FEC5),
            (290, 0, 0x1C7F62C0),
            (578, 0, 0x1C3FB160),
            (866, 0, 0x1C1FD8B0),
            (1154, 0, 0x1C0FEC58),
            (1442, 0, 0x1C07F62C),
            (1730, 0, 0x1C03FB16),
            (2018, 0, 0x1C01FD8B),
            (2306, 0, 0x1C00FEC5),
            (2594, 0, 0x1B7F62C0),
            (2882, 0, 0x1B3FB160),
            (3170, 0, 0x1B1FD8B0),
            (3458, 0, 0x1B0FEC58),
            (3746, 0, 0x1B07F62C),
            (4034, 0, 0x1B03FB16),
            (4322, 0, 0x1B01FD8B),
            (4610, 0, 0x1B00FEC5),
            (4898, 0, 0x1A7F62C0),
            (5186, 0, 0x1A3FB160),
            (5474, 0, 0x1A1FD8B0),
            (5762, 0, 0x1A0FEC58),
            (6050, 0, 0x1A07F62C),
            (6338, 0, 0x1A03FB16),
            (6626, 0, 0x1A01FD8B),
            (6914, 0, 0x1A00FEC5),
            (7202, 0, 0x197F62C0),
            (7490, 0, 0x193FB160),
            (7778, 0, 0x191FD8B0),
            (8066, 0, 0x190FEC58),
            (8354, 0, 0x1907F62C),
            (8642, 0, 0x1903FB16),
            (8930, 0, 0x1901FD8B),
            (9218, 0, 0x1900FEC5),
            (9506, 0, 0x187F62C0),
            (9794, 0, 0x183FB160),
            (10082, 0, 0x181FD8B0),
            (10370, 0, 0x180FEC58),
            (10658, 0, 0x1807F62C),
            (10946, 0, 0x1803FB16),
            (11234, 0, 0x1801FD8B),
            (11522, 0, 0x1800FEC5),
            (11810, 0, 0x177F62C0),
            (12098, 0, 0x173FB160),
            (12386, 0, 0x171FD8B0),
            (12674, 0, 0x170FEC58),
            (12962, 0, 0x1707F62C),
            (13250, 0, 0x1703FB16),
            (13538, 0, 0x1701FD8B),
            (13826, 0, 0x1700FEC5),
            (14114, 0, 0x167F62C0),
            (14402, 0, 0x163FB160),
            (14690, 0, 0x161FD8B0),
            (14978, 0, 0x160FEC58),
            (15266, 0, 0x1607F62C),
            (15554, 0, 0x1603FB16),
            (15842, 0, 0x1601FD8B),
            (16130, 0, 0x1600FEC5),
            (16418, 0, 0x157F62C0),
            (16706, 0, 0x153FB160),
            (16994, 0, 0x151FD8B0),
            (17282, 0, 0x150FEC58),
            (17570, 0, 0x1507F62C),
            (17858, 0, 0x1503FB16),
            (18146, 0, 0x1501FD8B),
            (18434, 0, 0x1500FEC5),
            (18722, 0, 0x147F62C0),
            (19010, 0, 0x143FB160),
            (19298, 0, 0x141FD8B0),
            (19586, 0, 0x140FEC58),
            (19874, 0, 0x1407F62C),
            (20162, 0, 0x1403FB16),
            (20450, 0, 0x1401FD8B),
            (20738, 0, 0x1400FEC5),
            (21026, 0, 0x137F62C0),
            (21314, 0, 0x133FB160),
            (21602, 0, 0x131FD8B0),
            (21890, 0, 0x130FEC58),
            (22178, 0, 0x1307F62C),
            (22466, 0, 0x1303FB16),
            (22754, 0, 0x1301FD8B),
            (23042, 0, 0x1300FEC5),
            (23330, 0, 0x127F62C0),
            (23618, 0, 0x123FB160),
            (23906, 0, 0x121FD8B0),
            (24194, 0, 0x120FEC58),
            (24482, 0, 0x1207F62C),
            (24770, 0, 0x1203FB16),
            (25058, 0, 0x1201FD8B),
            (25346, 0, 0x1200FEC5),
            (25634, 0, 0x117F62C0),
            (25922, 0, 0x113FB160),
            (26210, 0, 0x111FD8B0),
            (26498, 0, 0x110FEC58),
            (26786, 0, 0x1107F62C),
            (27074, 0, 0x1103FB16),
            (27362, 0, 0x1101FD8B),
            (27650, 0, 0x1100FEC5),
            (27938, 0, 0x107F62C0),
            (28226, 0, 0x103FB160),
            (28514, 0, 0x101FD8B0),
            (28802, 0, 0x100FEC58),
            (29090, 0, 0x1007F62C),
            (29378, 0, 0x1003FB16),
            (29666, 0, 0x1001FD8B),
            (29954, 0, 0x1000FEC5),
            (30242, 0, 0x0F7F62C0),
            (30530, 0, 0x0F3FB160),
            (30818, 0, 0x0F1FD8B0),
            (31106, 0, 0x0F0FEC58),
            (31394, 0, 0x0F07F62C),
            (31682, 0, 0x0F03FB16),
            (31970, 0, 0x0F01FD8B),
            (32258, 0, 0x0F00FEC5),
            (32546, 0, 0x0E7F62C0),
            (32834, 0, 0x0E3FB160),
            (33122, 0, 0x0E1FD8B0),
            (33410, 0, 0x0E0FEC58),
            (33698, 0, 0x0E07F62C),
            (33986, 0, 0x0E03FB16),
            (34274, 0, 0x0E01FD8B),
            (34562, 0, 0x0E00FEC5),
            (34850, 0, 0x0D7F62C0),
            (35138, 0, 0x0D3FB160),
            (35426, 0, 0x0D1FD8B0),
            (35714, 0, 0x0D0FEC58),
            (36002, 0, 0x0D07F62C),
            (36290, 0, 0x0D03FB16),
            (36578, 0, 0x0D01FD8B),
            (36866, 0, 0x0D00FEC5),
            (37154, 0, 0x0C7F62C0),
            (37442, 0, 0x0C3FB160),
            (37730, 0, 0x0C1FD8B0),
            (38018, 0, 0x0C0FEC58),
            (38306, 0, 0x0C07F62C),
            (38594, 0, 0x0C03FB16),
            (38882, 0, 0x0C01FD8B),
            (39170, 0, 0x0C00FEC5),
            (39458, 0, 0x0B7F62C0),
            (39746, 0, 0x0B3FB160),
            (40034, 0, 0x0B1FD8B0),
            (40322, 0, 0x0B0FEC58),
            (40610, 0, 0x0B07F62C),
            (40898, 0, 0x0B03FB16),
            (41186, 0, 0x0B01FD8B),
            (41474, 0, 0x0B00FEC5),
            (41762, 0, 0x0A7F62C0),
            (42050, 0, 0x0A3FB160),
            (42338, 0, 0x0A1FD8B0),
            (42626, 0, 0x0A0FEC58),
            (42914, 0, 0x0A07F62C),
            (43202, 0, 0x0A03FB16),
            (43490, 0, 0x0A01FD8B),
            (43778, 0, 0x0A00FEC5),
            (44066, 0, 0x097F62C0),
            (44354, 0, 0x093FB160),
            (44642, 0, 0x091FD8B0),
            (44930, 0, 0x090FEC58),
            (45218, 0, 0x0907F62C),
            (45506, 0, 0x0903FB16),
            (45794, 0, 0x0901FD8B),
            (46082, 0, 0x0900FEC5),
            (46370, 0, 0x087F62C0),
            (46658, 0, 0x083FB160),
            (46946, 0, 0x081FD8B0),
            (47234, 0, 0x080FEC58),
            (47522, 0, 0x0807F62C),
            (47810, 0, 0x0803FB16),
            (48098, 0, 0x0801FD8B),
            (48386, 0, 0x0800FEC5),
            (48674, 0, 0x077F62C0),
            (48962, 0, 0x073FB160),
            (49250, 0, 0x071FD8B0),
            (49538, 0, 0x070FEC58),
            (49826, 0, 0x0707F62C),
            (50114, 0, 0x0703FB16),
            (50402, 0, 0x0701FD8B),
            (50690, 0, 0x0700FEC5),
            (50978, 0, 0x067F62C0),
            (51266, 0, 0x063FB160),
            (51554, 0, 0x061FD8B0),
            (51842, 0, 0x060FEC58),
            (52130, 0, 0x0607F62C),
            (52418, 0, 0x0603FB16),
            (52706, 0, 0x0601FD8B),
            (52994, 0, 0x0600FEC5),
            (53282, 0, 0x057F62C0),
            (53570, 0, 0x053FB160),
            (53858, 0, 0x051FD8B0),
            (54146, 0, 0x050FEC58),
            (54434, 0, 0x0507F62C),
            (54722, 0, 0x0503FB16),
            (55010, 0, 0x0501FD8B),
            (55298, 0, 0x0500FEC5),
            (55586, 0, 0x047F62C0),
            (55874, 0, 0x043FB160),
            (56162, 0, 0x041FD8B0),
            (56450, 0, 0x040FEC58),
            (56738, 0, 0x0407F62C),
            (57026, 0, 0x0403FB16),
            (57314, 0, 0x0401FD8B),
            (57602, 0, 0x0400FEC5),
            (57890, 0, 0x037F62C0),
            (58178, 0, 0x033FB160),
            (58466, 0, 0x031FD8B0),
            (58754, 0, 0x030FEC58),
            (59042, 0, 0x0307F62C),
            (59330, 0, 0x0303FB16),
            (59618, 0, 0x0301FD8B),
            (59906, 0, 0x0300FEC5),
            (60194, 0, 0x027F6200),
            (60482, 0, 0x023FB100),
            (60770, 0, 0x021FD800),
            (61058, 0, 0x020FEC00),
            (61346, 0, 0x0207F600),
            (61634, 0, 0x0203FB00),
            (61922, 0, 0x0201FD00),
            (62210, 0, 0x0200FE00),
            (62498, 0, 0x017F0000),
            (62786, 0, 0x013F0000),
            (63074, 0, 0x011F0000),
            (63362, 0, 0x010F0000),
            (63650, 0, 0x01070000),
            (63938, 0, 0x01030000),
            (64226, 0, 0x01010000),
            (64514, 0, 0x01010000),
        ]
        self.validate_blocksequence(1, 0, 0x1D00FFFF, blocks)

    # Deterministically random solvetimes for stable hashrate around a recent real life nBits
    def test_random_solvetimes_stable_hashrate(self):
        blocks = [
            (1, 600, 0x1802AEE8),
            (2, 710, 0x1802AD91),
            (3, 727, 0x1802ABF8),
            (4, 1139, 0x1802AB73),
            (5, 1619, 0x1802AB20),
            (6, 2004, 0x1802AA89),
            (7, 2146, 0x1802A94B),
            (8, 6499, 0x1802B39C),
            (9, 6499, 0x1802B1F2),
            (10, 7057, 0x1802B1D4),
            (11, 8026, 0x1802B2DB),
            (12, 8216, 0x1802B1B7),
            (13, 9032, 0x1802B252),
            (14, 10204, 0x1802B3E7),
            (15, 11127, 0x1802B4CE),
            (16, 11161, 0x1802B33C),
            (17, 12400, 0x1802B501),
            (18, 13544, 0x1802B686),
            (19, 14702, 0x1802B816),
            (20, 14843, 0x1802B6CF),
            (21, 18302, 0x1802BED6),
            (22, 18748, 0x1802BE68),
            (23, 19759, 0x1802BF92),
            (24, 20160, 0x1802BF01),
            (25, 20685, 0x1802BECB),
            (26, 20825, 0x1802BD7C),
            (27, 21385, 0x1802BD61),
            (28, 21500, 0x1802BC02),
            (29, 21570, 0x1802BA85),
            (30, 22687, 0x1802BBF9),
            (31, 22865, 0x1802BACA),
            (32, 23949, 0x1802BC27),
            (33, 24381, 0x1802BBAE),
            (34, 25019, 0x1802BBC9),
            (35, 25939, 0x1802BCB0),
            (36, 26781, 0x1802BD5C),
            (37, 27665, 0x1802BE2A),
            (38, 29603, 0x1802C1F6),
            (39, 30224, 0x1802C203),
            (40, 30937, 0x1802C254),
            (41, 31879, 0x1802C34D),
            (42, 32413, 0x1802C31D),
            (43, 33015, 0x1802C31F),
            (44, 33344, 0x1802C25C),
            (45, 33632, 0x1802C177),
            (46, 33768, 0x1802C028),
            (47, 33834, 0x1802BEA6),
            (48, 34205, 0x1802BDFF),
            (49, 34210, 0x1802BC52),
            (50, 34241, 0x1802BAB7),
            (51, 34314, 0x1802B93D),
            (52, 34735, 0x1802B8BC),
            (53, 36823, 0x1802BCEE),
            (54, 37449, 0x1802BCFE),
            (55, 37835, 0x1802BC65),
            (56, 38472, 0x1802BC7D),
            (57, 38834, 0x1802BBD4),
            (58, 38906, 0x1802BA57),
            (59, 39160, 0x1802B960),
            (60, 39632, 0x1802B902),
            (61, 39953, 0x1802B83C),
            (62, 40696, 0x1802B8A2),
            (63, 40990, 0x1802B7C6),
            (64, 41109, 0x1802B66E),
            (65, 42047, 0x1802B760),
            (66, 42893, 0x1802B80E),
            (67, 42893, 0x1802B663),
            (68, 42901, 0x1802B4BB),
            (69, 43369, 0x1802B45D),
            (70, 43575, 0x1802B344),
            (71, 44156, 0x1802B339),
            (72, 44163, 0x1802B191),
            (73, 44970, 0x1802B225),
            (74, 45634, 0x1802B252),
            (75, 45884, 0x1802B159),
            (76, 46068, 0x1802B032),
            (77, 46139, 0x1802AEBD),
            (78, 46149, 0x1802AD21),
            (79, 46215, 0x1802ABA9),
            (80, 47549, 0x1802ADAB),
            (81, 47606, 0x1802AC2F),
            (82, 47891, 0x1802AB52),
            (83, 47930, 0x1802A9C9),
            (84, 48495, 0x1802A9B2),
            (85, 49040, 0x1802A98B),
            (86, 49166, 0x1802A840),
            (87, 49690, 0x1802A80D),
            (88, 51936, 0x1802AC8A),
            (89, 52014, 0x1802AB1C),
            (90, 52173, 0x1802A9E9),
            (91, 52631, 0x1802A986),
            (92, 54443, 0x1802ACD4),
            (93, 55435, 0x1802ADE9),
            (94, 55485, 0x1802AC65),
            (95, 56318, 0x1802AD0A),
            (96, 58035, 0x1802B019),
            (97, 60999, 0x1802B6AE),
            (98, 61373, 0x1802B60B),
            (99, 62511, 0x1802B78D),
            (100, 62601, 0x1802B620),
            (101, 63881, 0x1802B809),
            (102, 64335, 0x1802B79D),
            (103, 64631, 0x1802B6C4),
            (104, 65193, 0x1802B6A9),
            (105, 65609, 0x1802B626),
            (106, 66777, 0x1802B7BB),
            (107, 67040, 0x1802B6CC),
            (108, 67160, 0x1802B575),
            (109, 67569, 0x1802B4EC),
            (110, 67859, 0x1802B410),
            (111, 68948, 0x1802B56C),
            (112, 69069, 0x1802B415),
            (113, 69293, 0x1802B30B),
            (114, 69333, 0x1802B17C),
            (115, 70707, 0x1802B3A2),
            (116, 71211, 0x1802B35F),
            (117, 71266, 0x1802B1DC),
            (118, 71499, 0x1802B0D8),
            (119, 71662, 0x1802AFA1),
            (120, 71807, 0x1802AE60),
            (121, 71852, 0x1802ACDB),
            (122, 72031, 0x1802ABB4),
            (123, 72496, 0x1802AB56),
            (124, 72581, 0x1802A9EE),
            (125, 76405, 0x1802B2CB),
            (126, 76749, 0x1802B215),
            (127, 78166, 0x1802B45B),
            (128, 78289, 0x1802B306),
            (129, 78567, 0x1802B222),
            (130, 78854, 0x1802B143),
            (131, 78956, 0x1802AFE4),
            (132, 80010, 0x1802B126),
            (133, 81349, 0x1802B331),
            (134, 81813, 0x1802B2D0),
            (135, 82761, 0x1802B3C7),
            (136, 83130, 0x1802B326),
            (137, 83438, 0x1802B255),
            (138, 84556, 0x1802B3C5),
            (139, 84809, 0x1802B2CE),
            (140, 85577, 0x1802B346),
            (141, 86155, 0x1802B336),
            (142, 86452, 0x1802B25D),
            (143, 86770, 0x1802B196),
            (144, 86789, 0x1802AFF9),
            (145, 86842, 0x1802AE7B),
            (146, 87078, 0x1802AD7B),
            (147, 87450, 0x1802ACDA),
            (148, 87691, 0x1802ABDF),
            (149, 88073, 0x1802AB46),
            (150, 88263, 0x1802AA27),
            (151, 88267, 0x1802A887),
            (152, 88554, 0x1802A7AC),
            (153, 88906, 0x1802A700),
            (154, 91010, 0x1802AB18),
            (155, 92923, 0x1802AEB2),
            (156, 92938, 0x1802AD17),
            (157, 93137, 0x1802ABFE),
            (158, 93652, 0x1802ABC3),
            (159, 93944, 0x1802AAEB),
            (160, 94595, 0x1802AB10),
            (161, 94794, 0x1802A9F8),
            (162, 95063, 0x1802A910),
            (163, 95322, 0x1802A822),
            (164, 95451, 0x1802A6D9),
            (165, 95505, 0x1802A55E),
            (166, 95901, 0x1802A4D1),
            (167, 96576, 0x1802A505),
            (168, 96943, 0x1802A464),
            (169, 97095, 0x1802A32D),
            (170, 99235, 0x1802A75A),
            (171, 99407, 0x1802A630),
            (172, 100219, 0x1802A6C4),
            (173, 100827, 0x1802A6C9),
            (174, 101065, 0x1802A5CE),
            (175, 102612, 0x1802A861),
            (176, 103841, 0x1802AA17),
            (177, 104532, 0x1802AA57),
            (178, 106122, 0x1802AD0B),
            (179, 106162, 0x1802AB83),
            (180, 107256, 0x1802ACDE),
            (181, 107852, 0x1802ACDB),
            (182, 108734, 0x1802ADA1),
            (183, 108767, 0x1802AC14),
            (184, 109054, 0x1802AB38),
            (185, 111645, 0x1802B0B0),
            (186, 111921, 0x1802AFC9),
            (187, 115189, 0x1802B735),
            (188, 115330, 0x1802B5ED),
            (189, 115509, 0x1802B4C1),
            (190, 115889, 0x1802B425),
            (191, 117159, 0x1802B603),
            (192, 118846, 0x1802B90D),
            (193, 119449, 0x1802B910),
            (194, 119541, 0x1802B7A3),
            (195, 119836, 0x1802B6C9),
            (196, 121587, 0x1802BA04),
            (197, 122397, 0x1802BA97),
            (198, 122890, 0x1802BA4C),
            (199, 124418, 0x1802BCE8),
            (200, 125004, 0x1802BCDE),
            (201, 125689, 0x1802BD1B),
            (202, 126017, 0x1802BC57),
            (203, 126545, 0x1802BC22),
            (204, 126671, 0x1802BACD),
            (205, 127239, 0x1802BAB7),
            (206, 127246, 0x1802B90D),
            (207, 127861, 0x1802B918),
            (208, 128663, 0x1802B9A8),
            (209, 129352, 0x1802B9E9),
            (210, 129529, 0x1802B8BA),
            (211, 130218, 0x1802B8FA),
            (212, 130916, 0x1802B940),
            (213, 132713, 0x1802BC9D),
            (214, 133469, 0x1802BD0E),
            (215, 133491, 0x1802BB6E),
            (216, 134778, 0x1802BD5C),
            (217, 134972, 0x1802BC37),
            (218, 135017, 0x1802BAA7),
            (219, 136308, 0x1802BC98),
            (220, 137730, 0x1802BEEB),
            (221, 137820, 0x1802BD79),
            (222, 138093, 0x1802BC8D),
            (223, 138447, 0x1802BBDC),
            (224, 140826, 0x1802C0E4),
            (225, 142136, 0x1802C2E7),
            (226, 143223, 0x1802C449),
            (227, 143428, 0x1802C32A),
            (228, 143476, 0x1802C198),
            (229, 143705, 0x1802C08B),
            (230, 143809, 0x1802BF24),
            (231, 144153, 0x1802BE6B),
            (232, 144540, 0x1802BDD2),
            (233, 144656, 0x1802BC72),
            (234, 145689, 0x1802BDAC),
            (235, 146070, 0x1802BD0E),
            (236, 146251, 0x1802BBDF),
            (237, 147178, 0x1802BCCB),
            (238, 147860, 0x1802BD08),
            (239, 148165, 0x1802BC32),
            (240, 150337, 0x1802C0A1),
            (241, 152035, 0x1802C3BE),
            (242, 152068, 0x1802C223),
            (243, 154005, 0x1802C5F1),
            (244, 154026, 0x1802C44C),
            (245, 155611, 0x1802C718),
            (246, 157240, 0x1802CA0D),
            (247, 157820, 0x1802C9FD),
            (248, 157946, 0x1802C8A0),
            (249, 158083, 0x1802C74E),
            (250, 158590, 0x1802C70B),
            (251, 158746, 0x1802C5C6),
            (252, 161069, 0x1802CAB3),
            (253, 162129, 0x1802CC06),
            (254, 162205, 0x1802CA86),
            (255, 162308, 0x1802C919),
            (256, 162313, 0x1802C764),
            (257, 163196, 0x1802C832),
            (258, 163285, 0x1802C6BD),
            (259, 164182, 0x1802C797),
            (260, 164861, 0x1802C7D2),
            (261, 165472, 0x1802C7D7),
            (262, 165584, 0x1802C672),
            (263, 167370, 0x1802C9D7),
            (264, 167410, 0x1802C840),
            (265, 167500, 0x1802C6C8),
            (266, 167690, 0x1802C59E),
            (267, 168205, 0x1802C55E),
            (268, 168267, 0x1802C3D6),
            (269, 168356, 0x1802C264),
            (270, 168952, 0x1802C261),
            (271, 169286, 0x1802C1A0),
            (272, 170899, 0x1802C47F),
            (273, 170933, 0x1802C2E4),
            (274, 171026, 0x1802C172),
            (275, 171184, 0x1802C033),
            (276, 171189, 0x1802BE83),
            (277, 171530, 0x1802BDCA),
            (278, 172278, 0x1802BE35),
            (279, 173020, 0x1802BE9B),
            (280, 174025, 0x1802BFBF),
            (281, 175313, 0x1802C1B3),
            (282, 175523, 0x1802C099),
            (283, 176059, 0x1802C068),
            (284, 178630, 0x1802C604),
            (285, 179052, 0x1802C581),
            (286, 179935, 0x1802C652),
            (287, 180530, 0x1802C64C),
            (288, 181154, 0x1802C65F),
            (289, 181892, 0x1802C6C3),
            (290, 182343, 0x1802C657),
            (291, 183605, 0x1802C83A),
            (292, 184703, 0x1802C9A7),
            (293, 184958, 0x1802C8AB),
            (294, 184965, 0x1802C6F8),
            (295, 185550, 0x1802C6ED),
            (296, 186486, 0x1802C7E4),
            (297, 188365, 0x1802CB8F),
            (298, 188827, 0x1802CB27),
            (299, 188876, 0x1802C992),
            (300, 190706, 0x1802CD1D),
            (301, 190742, 0x1802CB7D),
            (302, 192474, 0x1802CEBF),
            (303, 193518, 0x1802D009),
            (304, 194682, 0x1802D1A9),
            (305, 194986, 0x1802D0CD),
            (306, 195466, 0x1802D075),
            (307, 195653, 0x1802CF43),
            (308, 196275, 0x1802CF55),
            (309, 196405, 0x1802CDF9),
            (310, 198144, 0x1802D143),
            (311, 199068, 0x1802D232),
            (312, 199583, 0x1802D1F4),
            (313, 201305, 0x1802D537),
            (314, 201603, 0x1802D455),
            (315, 201617, 0x1802D2A3),
            (316, 202798, 0x1802D453),
            (317, 202842, 0x1802D2B5),
            (318, 203119, 0x1802D1C7),
            (319, 203431, 0x1802D0ED),
            (320, 203806, 0x1802D04A),
            (321, 204030, 0x1802CF33),
            (322, 204682, 0x1802CF58),
            (323, 205386, 0x1802CFA6),
            (324, 205767, 0x1802CF05),
            (325, 206891, 0x1802D087),
            (326, 207620, 0x1802D0E8),
            (327, 207862, 0x1802CFDE),
            (328, 208552, 0x1802D021),
            (329, 208904, 0x1802CF68),
            (330, 209210, 0x1802CE8F),
            (331, 209774, 0x1802CE74),
            (332, 209880, 0x1802CD0A),
            (333, 210175, 0x1802CC28),
            (334, 210286, 0x1802CAC1),
            (335, 210920, 0x1802CAD9),
            (336, 211828, 0x1802CBBD),
            (337, 212204, 0x1802CB17),
            (338, 212281, 0x1802C997),
            (339, 212620, 0x1802C8D6),
            (340, 213049, 0x1802C85A),
            (341, 213989, 0x1802C954),
            (342, 214176, 0x1802C825),
            (343, 214886, 0x1802C875),
            (344, 215031, 0x1802C728),
            (345, 215336, 0x1802C652),
            (346, 215436, 0x1802C4E2),
            (347, 215488, 0x1802C355),
            (348, 216273, 0x1802C3DB),
            (349, 217512, 0x1802C5AE),
            (350, 217915, 0x1802C51D),
            (351, 218968, 0x1802C667),
            (352, 219269, 0x1802C58E),
            (353, 219879, 0x1802C596),
            (354, 220268, 0x1802C4FD),
            (355, 220642, 0x1802C457),
            (356, 220757, 0x1802C2F5),
            (357, 220900, 0x1802C1AA),
            (358, 222828, 0x1802C570),
            (359, 223484, 0x1802C599),
            (360, 223526, 0x1802C404),
            (361, 224365, 0x1802C4AF),
            (362, 224585, 0x1802C39B),
            (363, 225155, 0x1802C385),
            (364, 225364, 0x1802C269),
            (365, 226400, 0x1802C3A6),
            (366, 226511, 0x1802C243),
            (367, 227297, 0x1802C2CA),
            (368, 227716, 0x1802C246),
            (369, 227780, 0x1802C0C1),
            (370, 227976, 0x1802BF9D),
            (371, 227982, 0x1802BDEF),
            (372, 228362, 0x1802BD4E),
            (373, 228763, 0x1802BCC0),
            (374, 229305, 0x1802BC98),
            (375, 229437, 0x1802BB46),
            (376, 229538, 0x1802B9DE),
            (377, 230796, 0x1802BBB9),
            (378, 231023, 0x1802BAAA),
            (379, 231954, 0x1802BB9C),
            (380, 232011, 0x1802BA14),
            (381, 232600, 0x1802BA0C),
            (382, 233119, 0x1802B9D1),
            (383, 233935, 0x1802BA6C),
            (384, 235833, 0x1802BE15),
            (385, 235871, 0x1802BC7D),
            (386, 236093, 0x1802BB6E),
            (387, 238652, 0x1802C0F4),
            (388, 239165, 0x1802C0B6),
            (389, 239452, 0x1802BFD5),
            (390, 239678, 0x1802BEC6),
            (391, 240156, 0x1802BE6D),
            (392, 240285, 0x1802BD19),
            (393, 240654, 0x1802BC72),
            (394, 241313, 0x1802BC9D),
            (395, 241864, 0x1802BC78),
            (396, 242433, 0x1802BC62),
            (397, 242481, 0x1802BAD5),
            (398, 243168, 0x1802BB13),
            (399, 243217, 0x1802B988),
            (400, 243475, 0x1802B891),
            (401, 243868, 0x1802B7FE),
            (402, 243912, 0x1802B671),
            (403, 244463, 0x1802B64B),
            (404, 244726, 0x1802B55C),
            (405, 244949, 0x1802B450),
            (406, 245180, 0x1802B349),
            (407, 246248, 0x1802B496),
            (408, 247121, 0x1802B55A),
            (409, 247179, 0x1802B3D5),
            (410, 248389, 0x1802B58A),
            (411, 248467, 0x1802B415),
            (412, 249262, 0x1802B4A1),
            (413, 249334, 0x1802B326),
            (414, 249597, 0x1802B237),
            (415, 250666, 0x1802B384),
            (416, 250896, 0x1802B27D),
            (417, 250902, 0x1802B0D8),
            (418, 252219, 0x1802B2D6),
            (419, 252648, 0x1802B25D),
            (420, 253037, 0x1802B1C7),
            (421, 253484, 0x1802B159),
            (422, 253630, 0x1802B017),
            (423, 253964, 0x1802AF5B),
            (424, 254722, 0x1802AFCC),
            (425, 256523, 0x1802B31E),
            (426, 257214, 0x1802B361),
            (427, 258429, 0x1802B517),
            (428, 258680, 0x1802B420),
            (429, 261356, 0x1802B9EC),
            (430, 261437, 0x1802B877),
            (431, 261998, 0x1802B85C),
            (432, 262040, 0x1802B6CC),
            (433, 262385, 0x1802B616),
            (434, 262702, 0x1802B54C),
            (435, 262976, 0x1802B463),
            (436, 265008, 0x1802B861),
            (437, 265694, 0x1802B8A2),
            (438, 265891, 0x1802B780),
            (439, 266137, 0x1802B684),
            (440, 266540, 0x1802B5F5),
            (441, 267515, 0x1802B702),
            (442, 267569, 0x1802B57A),
            (443, 267943, 0x1802B4D9),
            (444, 268093, 0x1802B39A),
            (445, 268834, 0x1802B3FD),
            (446, 269731, 0x1802B4D1),
            (447, 270336, 0x1802B4D6),
            (448, 270565, 0x1802B3CD),
            (449, 270696, 0x1802B27D),
            (450, 271054, 0x1802B1D1),
            (451, 271612, 0x1802B1B4),
            (452, 271868, 0x1802B0C0),
            (453, 271919, 0x1802AF3B),
            (454, 272422, 0x1802AEF8),
            (455, 272531, 0x1802ADA0),
            (456, 273035, 0x1802AD5C),
            (457, 273406, 0x1802ACBB),
            (458, 274868, 0x1802AF15),
            (459, 275073, 0x1802AE02),
            (460, 275179, 0x1802ACA8),
            (461, 275395, 0x1802AB9A),
            (462, 276724, 0x1802AD9B),
            (463, 277219, 0x1802AD50),
            (464, 277631, 0x1802ACCC),
            (465, 278174, 0x1802ACA4),
            (466, 278379, 0x1802AB90),
            (467, 278847, 0x1802AB33),
            (468, 280130, 0x1802AD11),
            (469, 281633, 0x1802AF8B),
            (470, 282274, 0x1802AFA9),
            (471, 282919, 0x1802AFC9),
            (472, 283275, 0x1802AF1A),
            (473, 283402, 0x1802ADD2),
            (474, 283513, 0x1802AC79),
            (475, 283807, 0x1802ABA4),
            (476, 284550, 0x1802AC07),
            (477, 284623, 0x1802AA96),
            (478, 285298, 0x1802AACC),
            (479, 286058, 0x1802AB3C),
            (480, 287474, 0x1802AD77),
            (481, 289156, 0x1802B06F),
            (482, 289245, 0x1802AF08),
            (483, 289272, 0x1802AD75),
            (484, 290561, 0x1802AF58),
            (485, 290760, 0x1802AE3E),
            (486, 290796, 0x1802ACB5),
            (487, 292590, 0x1802AFF9),
            (488, 292869, 0x1802AF18),
            (489, 293270, 0x1802AE8E),
            (490, 293977, 0x1802AED9),
            (491, 295096, 0x1802B047),
            (492, 295283, 0x1802AF23),
            (493, 296461, 0x1802B0BA),
            (494, 296578, 0x1802AF66),
            (495, 296635, 0x1802ADE9),
            (496, 297629, 0x1802AEFA),
            (497, 298508, 0x1802AFC1),
            (498, 298529, 0x1802AE2A),
            (499, 299190, 0x1802AE55),
            (500, 300020, 0x1802AEF5),
            (501, 302357, 0x1802B3C7),
            (502, 302369, 0x1802B225),
            (503, 302870, 0x1802B1DC),
            (504, 303733, 0x1802B298),
            (505, 303949, 0x1802B186),
            (506, 304273, 0x1802B0C5),
            (507, 306111, 0x1802B433),
            (508, 306511, 0x1802B3A4),
            (509, 306659, 0x1802B265),
            (510, 307520, 0x1802B31E),
            (511, 307724, 0x1802B204),
            (512, 308144, 0x1802B184),
            (513, 309067, 0x1802B26A),
            (514, 309651, 0x1802B25D),
            (515, 310240, 0x1802B258),
            (516, 310559, 0x1802B18E),
            (517, 310609, 0x1802B009),
            (518, 312269, 0x1802B2F9),
            (519, 312488, 0x1802B1EA),
            (520, 312994, 0x1802B1A7),
            (521, 313247, 0x1802B0B2),
            (522, 313556, 0x1802AFE4),
            (523, 316415, 0x1802B62B),
            (524, 317595, 0x1802B7C8),
            (525, 317850, 0x1802B6D1),
            (526, 318518, 0x1802B702),
            (527, 318531, 0x1802B562),
            (528, 318569, 0x1802B3CF),
            (529, 319369, 0x1802B45D),
            (530, 319890, 0x1802B425),
            (531, 319947, 0x1802B2A3),
            (532, 320195, 0x1802B1A9),
            (533, 320364, 0x1802B075),
            (534, 322547, 0x1802B4DC),
            (535, 322959, 0x1802B455),
            (536, 324133, 0x1802B5F0),
            (537, 324171, 0x1802B45D),
            (538, 324684, 0x1802B420),
            (539, 324907, 0x1802B313),
            (540, 325793, 0x1802B3E2),
            (541, 326335, 0x1802B3B7),
            (542, 327662, 0x1802B5BD),
            (543, 328669, 0x1802B6E1),
            (544, 328949, 0x1802B5FB),
            (545, 329498, 0x1802B5D8),
            (546, 330621, 0x1802B74D),
            (547, 330752, 0x1802B5FD),
            (548, 331656, 0x1802B6D7),
            (549, 331803, 0x1802B592),
            (550, 333260, 0x1802B7F8),
            (551, 337521, 0x1802C249),
            (552, 337773, 0x1802C14D),
            (553, 337989, 0x1802C038),
            (554, 340301, 0x1802C513),
            (555, 340796, 0x1802C4C7),
            (556, 340906, 0x1802C360),
            (557, 343167, 0x1802C81D),
            (558, 344982, 0x1802CB9A),
            (559, 346027, 0x1802CCE2),
            (560, 346126, 0x1802CB72),
            (561, 346529, 0x1802CADE),
            (562, 346723, 0x1802C9B5),
            (563, 347155, 0x1802C939),
            (564, 348411, 0x1802CB1C),
            (565, 348525, 0x1802C9B7),
            (566, 349016, 0x1802C967),
            (567, 351524, 0x1802CEE5),
            (568, 352190, 0x1802CF15),
            (569, 353133, 0x1802D011),
            (570, 353289, 0x1802CECA),
            (571, 354236, 0x1802CFCB),
            (572, 354522, 0x1802CEE2),
            (573, 354681, 0x1802CD9D),
            (574, 358036, 0x1802D597),
            (575, 358380, 0x1802D4D9),
            (576, 359217, 0x1802D58A),
            (577, 359640, 0x1802D506),
            (578, 359936, 0x1802D422),
            (579, 360417, 0x1802D3CA),
            (580, 360485, 0x1802D242),
            (581, 360701, 0x1802D123),
            (582, 360742, 0x1802CF86),
            (583, 361721, 0x1802D09F),
            (584, 362570, 0x1802D156),
            (585, 362645, 0x1802CFD1),
            (586, 363045, 0x1802CF3D),
            (587, 363341, 0x1802CE5F),
            (588, 363346, 0x1802CCA6),
            (589, 364670, 0x1802CEBC),
            (590, 364901, 0x1802CDAB),
            (591, 365468, 0x1802CD93),
            (592, 365944, 0x1802CD37),
            (593, 366324, 0x1802CC96),
            (594, 368105, 0x1802CFFE),
            (595, 368148, 0x1802CE61),
            (596, 368318, 0x1802CD25),
            (597, 368692, 0x1802CC7E),
            (598, 368715, 0x1802CAD6),
            (599, 369187, 0x1802CA76),
            (600, 369435, 0x1802C977),
            (601, 369617, 0x1802C842),
            (602, 370753, 0x1802C9CD),
            (603, 370822, 0x1802C845),
            (604, 371418, 0x1802C845),
            (605, 371599, 0x1802C710),
            (606, 371618, 0x1802C568),
            (607, 371839, 0x1802C454),
            (608, 371914, 0x1802C2D7),
            (609, 372533, 0x1802C2E4),
            (610, 372723, 0x1802C1BB),
            (611, 373430, 0x1802C208),
            (612, 373527, 0x1802C09B),
            (613, 373778, 0x1802BF9F),
            (614, 373882, 0x1802BE38),
            (615, 375274, 0x1802C073),
            (616, 375639, 0x1802BFCA),
            (617, 376243, 0x1802BFCD),
            (618, 376392, 0x1802BE86),
            (619, 377838, 0x1802C0EC),
            (620, 378708, 0x1802C1B0),
            (621, 378775, 0x1802C02B),
            (622, 379350, 0x1802C01B),
            (623, 379661, 0x1802BF49),
            (624, 379865, 0x1802BE2A),
            (625, 379997, 0x1802BCD8),
            (626, 382864, 0x1802C342),
            (627, 382891, 0x1802C1A2),
            (628, 383188, 0x1802C0C6),
            (629, 384265, 0x1802C221),
            (630, 384307, 0x1802C08B),
            (631, 384370, 0x1802BF06),
            (632, 384387, 0x1802BD64),
            (633, 384654, 0x1802BC72),
            (634, 385307, 0x1802BC98),
            (635, 385517, 0x1802BB81),
            (636, 385699, 0x1802BA52),
            (637, 386131, 0x1802B9D9),
            (638, 386154, 0x1802B83C),
            (639, 386902, 0x1802B8A7),
            (640, 386999, 0x1802B73D),
            (641, 387322, 0x1802B676),
            (642, 388262, 0x1802B76A),
            (643, 388496, 0x1802B663),
            (644, 388579, 0x1802B4F4),
            (645, 389605, 0x1802B623),
            (646, 392242, 0x1802BBD9),
            (647, 393050, 0x1802BC70),
            (648, 394627, 0x1802BF2F),
            (649, 394837, 0x1802BE17),
            (650, 395728, 0x1802BEE9),
            (651, 396134, 0x1802BE5D),
            (652, 396421, 0x1802BD7C),
            (653, 397690, 0x1802BF5C),
            (654, 397751, 0x1802BDDA),
            (655, 397752, 0x1802BC2A),
            (656, 398008, 0x1802BB30),
            (657, 400092, 0x1802BF5F),
            (658, 400450, 0x1802BEB0),
            (659, 401277, 0x1802BF54),
            (660, 401481, 0x1802BE35),
            (661, 402295, 0x1802BED1),
            (662, 402541, 0x1802BDD2),
            (663, 403289, 0x1802BE3A),
            (664, 404885, 0x1802C10C),
            (665, 405502, 0x1802C11A),
            (666, 405824, 0x1802C050),
            (667, 406529, 0x1802C09B),
            (668, 407661, 0x1802C21E),
            (669, 410409, 0x1802C83D),
            (670, 410458, 0x1802C6AA),
            (671, 410602, 0x1802C55B),
            (672, 410622, 0x1802C3B6),
            (673, 411928, 0x1802C5B9),
            (674, 412519, 0x1802C5B4),
            (675, 412550, 0x1802C414),
            (676, 413073, 0x1802C3DB),
            (677, 413507, 0x1802C363),
            (678, 414107, 0x1802C363),
            (679, 415415, 0x1802C566),
            (680, 415697, 0x1802C47F),
            (681, 416272, 0x1802C46C),
            (682, 416579, 0x1802C396),
            (683, 416746, 0x1802C25C),
            (684, 417307, 0x1802C241),
            (685, 417367, 0x1802C0B6),
            (686, 417831, 0x1802C056),
            (687, 418120, 0x1802BF74),
            (688, 418667, 0x1802BF4F),
            (689, 418822, 0x1802BE0D),
            (690, 418935, 0x1802BCAB),
            (691, 419237, 0x1802BBD4),
            (692, 420228, 0x1802BCEE),
            (693, 420825, 0x1802BCEE),
            (694, 421170, 0x1802BC37),
            (695, 421891, 0x1802BC8A),
            (696, 422087, 0x1802BB69),
            (697, 422750, 0x1802BB96),
            (698, 423017, 0x1802BAA7),
            (699, 424837, 0x1802BE17),
            (700, 424898, 0x1802BC92),
            (701, 426199, 0x1802BE8B),
            (702, 429829, 0x1802C726),
            (703, 430313, 0x1802C6D3),
            (704, 431568, 0x1802C8B3),
            (705, 432872, 0x1802CAB6),
            (706, 432925, 0x1802C924),
            (707, 433989, 0x1802CA78),
            (708, 434048, 0x1802C8EB),
            (709, 434054, 0x1802C739),
            (710, 435485, 0x1802C99A),
            (711, 435819, 0x1802C8D6),
            (712, 436087, 0x1802C7E4),
            (713, 436926, 0x1802C893),
            (714, 437333, 0x1802C805),
            (715, 439297, 0x1802CBF0),
            (716, 440627, 0x1802CE09),
            (717, 440909, 0x1802CD1F),
            (718, 440973, 0x1802CB95),
            (719, 441168, 0x1802CA68),
            (720, 442523, 0x1802CC94),
            (721, 442712, 0x1802CB67),
            (722, 442756, 0x1802C9CF),
            (723, 444695, 0x1802CDA8),
            (724, 445884, 0x1802CF5B),
            (725, 446788, 0x1802D03C),
            (726, 447050, 0x1802CF40),
            (727, 447085, 0x1802CDA0),
            (728, 447085, 0x1802CBE5),
            (729, 447246, 0x1802CAA3),
            (730, 447287, 0x1802C909),
            (731, 448273, 0x1802CA23),
            (732, 449001, 0x1802CA83),
            (733, 449472, 0x1802CA23),
            (734, 450746, 0x1802CC13),
            (735, 450915, 0x1802CAD6),
            (736, 450945, 0x1802C934),
            (737, 450947, 0x1802C77E),
            (738, 451000, 0x1802C5EC),
            (739, 451110, 0x1802C48A),
            (740, 451601, 0x1802C439),
            (741, 451901, 0x1802C35D),
            (742, 453519, 0x1802C644),
            (743, 453521, 0x1802C48F),
            (744, 455136, 0x1802C776),
            (745, 455259, 0x1802C619),
            (746, 455466, 0x1802C4FA),
            (747, 455919, 0x1802C48F),
            (748, 456055, 0x1802C33D),
            (749, 456302, 0x1802C23B),
            (750, 457378, 0x1802C396),
            (751, 457488, 0x1802C233),
            (752, 457922, 0x1802C1BB),
            (753, 458049, 0x1802C060),
            (754, 458176, 0x1802BF0C),
            (755, 458870, 0x1802BF4F),
            (756, 459126, 0x1802BE55),
            (757, 460382, 0x1802C030),
            (758, 461587, 0x1802C1E8),
            (759, 461893, 0x1802C114),
            (760, 462904, 0x1802C23E),
            (761, 463310, 0x1802C1B0),
            (762, 463657, 0x1802C0F9),
            (763, 463810, 0x1802BFB5),
            (764, 463928, 0x1802BE58),
            (765, 464156, 0x1802BD4C),
            (766, 464537, 0x1802BCAD),
            (767, 464817, 0x1802BBC9),
            (768, 465200, 0x1802BB2B),
            (769, 465921, 0x1802BB81),
            (770, 467919, 0x1802BF72),
            (771, 468240, 0x1802BEAB),
            (772, 468309, 0x1802BD29),
            (773, 468921, 0x1802BD33),
            (774, 469005, 0x1802BBBE),
            (775, 469136, 0x1802BA6C),
            (776, 469306, 0x1802B938),
            (777, 469857, 0x1802B915),
            (778, 469992, 0x1802B7C8),
            (779, 470186, 0x1802B6A4),
            (780, 470267, 0x1802B531),
            (781, 471304, 0x1802B66B),
            (782, 471633, 0x1802B5A7),
            (783, 471813, 0x1802B47E),
            (784, 472828, 0x1802B5A5),
            (785, 474202, 0x1802B7CE),
            (786, 475364, 0x1802B963),
            (787, 476387, 0x1802BA92),
            (788, 476448, 0x1802B910),
            (789, 476522, 0x1802B795),
            (790, 476638, 0x1802B63B),
            (791, 476681, 0x1802B4AE),
            (792, 477255, 0x1802B49B),
            (793, 478389, 0x1802B618),
            (794, 479990, 0x1802B8E5),
            (795, 479994, 0x1802B73A),
            (796, 480143, 0x1802B5F8),
            (797, 480764, 0x1802B605),
            (798, 480856, 0x1802B49B),
            (799, 481121, 0x1802B3AC),
            (800, 481886, 0x1802B422),
            (801, 482310, 0x1802B3A4),
            (802, 482341, 0x1802B20F),
            (803, 482366, 0x1802B077),
            (804, 483161, 0x1802B103),
            (805, 483689, 0x1802B0D0),
            (806, 483920, 0x1802AFC9),
            (807, 484041, 0x1802AE78),
            (808, 484990, 0x1802AF6E),
            (809, 485127, 0x1802AE29),
            (810, 486146, 0x1802AF4D),
            (811, 487153, 0x1802B06F),
            (812, 487718, 0x1802B054),
            (813, 487851, 0x1802AF0A),
            (814, 487945, 0x1802ADAA),
            (815, 488230, 0x1802ACCB),
            (816, 488808, 0x1802ACBC),
            (817, 489035, 0x1802ABB8),
            (818, 489059, 0x1802AA24),
            (819, 489729, 0x1802AA56),
            (820, 491417, 0x1802AD4E),
            (821, 491662, 0x1802AC56),
            (822, 492147, 0x1802AC06),
            (823, 492153, 0x1802AA66),
            (824, 493078, 0x1802AB48),
            (825, 493293, 0x1802AA3C),
            (826, 493449, 0x1802A906),
            (827, 493757, 0x1802A83A),
            (828, 494104, 0x1802A789),
            (829, 494310, 0x1802A679),
            (830, 495201, 0x1802A742),
            (831, 495475, 0x1802A65F),
            (832, 496710, 0x1802A819),
            (833, 497458, 0x1802A880),
            (834, 499804, 0x1802AD45),
            (835, 500231, 0x1802ACCC),
            (836, 500401, 0x1802ABA0),
            (837, 501907, 0x1802AE1A),
            (838, 502109, 0x1802AD02),
            (839, 502689, 0x1802ACF6),
            (840, 502810, 0x1802ABA5),
            (841, 502985, 0x1802AA7D),
            (842, 503377, 0x1802A9EA),
            (843, 504789, 0x1802AC23),
            (844, 505326, 0x1802ABF7),
            (845, 505988, 0x1802AC23),
            (846, 506333, 0x1802AB6F),
            (847, 506414, 0x1802AA04),
            (848, 506575, 0x1802A8D3),
            (849, 506829, 0x1802A7E0),
            (850, 506859, 0x1802A653),
            (851, 507002, 0x1802A517),
            (852, 507216, 0x1802A40C),
            (853, 507862, 0x1802A42B),
            (854, 507902, 0x1802A2A8),
            (855, 508625, 0x1802A2FD),
            (856, 509085, 0x1802A29C),
            (857, 509440, 0x1802A1F2),
            (858, 509781, 0x1802A13F),
            (859, 509883, 0x18029FE8),
            (860, 510160, 0x18029F0A),
            (861, 510256, 0x18029DAF),
            (862, 512527, 0x1802A22E),
            (863, 512936, 0x1802A1AB),
            (864, 512964, 0x1802A020),
            (865, 513368, 0x18029F9A),
            (866, 513416, 0x18029E1D),
            (867, 513816, 0x18029D94),
            (868, 514364, 0x18029D71),
            (869, 514713, 0x18029CC4),
            (870, 515850, 0x18029E35),
            (871, 516113, 0x18029D4D),
            (872, 516141, 0x18029BC5),
            (873, 516334, 0x18029AB0),
            (874, 516627, 0x180299DE),
            (875, 516736, 0x1802988E),
            (876, 517310, 0x1802987C),
            (877, 517347, 0x180296FE),
            (878, 517659, 0x1802963A),
            (879, 518013, 0x18029592),
            (880, 518111, 0x1802943F),
            (881, 518115, 0x180292AC),
            (882, 518575, 0x1802924D),
            (883, 518634, 0x180290E0),
            (884, 519914, 0x180292AC),
            (885, 520266, 0x18029205),
            (886, 522226, 0x1802959C),
            (887, 523388, 0x18029719),
            (888, 523555, 0x180295F3),
            (889, 524018, 0x18029596),
            (890, 524569, 0x18029576),
            (891, 526540, 0x1802991A),
            (892, 526735, 0x18029806),
            (893, 527359, 0x18029816),
            (894, 527604, 0x18029725),
            (895, 528256, 0x18029748),
            (896, 528545, 0x18029674),
            (897, 529209, 0x180296A1),
            (898, 529232, 0x18029518),
            (899, 529300, 0x180293B0),
            (900, 529652, 0x18029309),
            (901, 529763, 0x180291BD),
            (902, 530192, 0x1802914B),
            (903, 530819, 0x1802915D),
            (904, 530953, 0x18029023),
            (905, 531267, 0x18028F63),
            (906, 531451, 0x18028E4B),
            (907, 532675, 0x18028FEF),
            (908, 533169, 0x18028FA6),
            (909, 533868, 0x18028FEB),
            (910, 533894, 0x18028E68),
            (911, 535258, 0x1802906A),
            (912, 535885, 0x1802907B),
            (913, 537336, 0x180292BA),
            (914, 537482, 0x18029188),
            (915, 537908, 0x18029113),
            (916, 538154, 0x18029023),
            (917, 539375, 0x180291C5),
            (918, 539707, 0x18029110),
            (919, 539941, 0x1802901C),
            (920, 540884, 0x18029103),
            (921, 541037, 0x18028FD5),
            (922, 541382, 0x18028F28),
            (923, 541550, 0x18028E08),
            (924, 541951, 0x18028D81),
            (925, 544523, 0x180292B2),
            (926, 544567, 0x1802913A),
            (927, 544956, 0x180290AC),
            (928, 544988, 0x18028F2D),
            (929, 545034, 0x18028DBA),
            (930, 545231, 0x18028CAC),
            (931, 545887, 0x18028CD2),
            (932, 546091, 0x18028BC8),
            (933, 546103, 0x18028A40),
            (934, 546552, 0x180289DC),
            (935, 546589, 0x18028864),
            (936, 546824, 0x18028771),
            (937, 547027, 0x18028669),
            (938, 547049, 0x180284EA),
            (939, 547120, 0x1802838C),
            (940, 550663, 0x18028B2F),
            (941, 551130, 0x18028AD7),
            (942, 551167, 0x1802895F),
            (943, 551384, 0x18028860),
            (944, 551634, 0x18028777),
            (945, 553096, 0x180289B5),
            (946, 553305, 0x180288B0),
            (947, 554212, 0x1802897C),
            (948, 554389, 0x18028864),
            (949, 555019, 0x18028877),
            (950, 555519, 0x18028834),
            (951, 556525, 0x18028943),
            (952, 556638, 0x180287FF),
            (953, 556859, 0x18028703),
            (954, 556992, 0x180285CD),
            (955, 558254, 0x18028785),
            (956, 559350, 0x180288CE),
            (957, 559904, 0x180288B0),
            (958, 561021, 0x18028A09),
            (959, 563020, 0x18028DAF),
            (960, 563279, 0x18028CCC),
            (961, 563342, 0x18028B63),
            (962, 563554, 0x18028A60),
            (963, 564725, 0x18028BDF),
            (964, 564851, 0x18028AA2),
            (965, 564966, 0x1802895F),
            (966, 565035, 0x180287FE),
            (967, 565860, 0x18028893),
            (968, 567092, 0x18028A38),
            (969, 567936, 0x18028ADB),
            (970, 568124, 0x180289C8),
            (971, 568429, 0x18028904),
            (972, 568748, 0x18028848),
            (973, 569072, 0x18028791),
            (974, 570768, 0x18028A6A),
            (975, 571142, 0x180289D5),
            (976, 571500, 0x18028933),
            (977, 571826, 0x1802887C),
            (978, 571836, 0x180286F3),
            (979, 572733, 0x180287BA),
            (980, 572763, 0x1802863F),
            (981, 573256, 0x180285F8),
            (982, 576384, 0x18028C8C),
            (983, 577336, 0x18028D77),
            (984, 577976, 0x18028D93),
            (985, 579510, 0x18029007),
            (986, 580445, 0x180290E8),
            (987, 581954, 0x1802934D),
            (988, 582597, 0x1802936B),
            (989, 582723, 0x1802922A),
            (990, 583047, 0x1802916E),
            (991, 583305, 0x1802908A),
            (992, 586089, 0x1802964E),
            (993, 586326, 0x18029557),
            (994, 586691, 0x180294B7),
            (995, 587088, 0x1802942F),
            (996, 587202, 0x180292E6),
            (997, 587803, 0x180292E6),
            (998, 587944, 0x180291B0),
            (999, 588615, 0x180291E0),
            (1000, 589138, 0x180291AD),
        ]

        self.validate_blocksequence(1, 0, 0x1802AEE8, blocks)

    # Deterministically random solvetimes for up-ramping hashrate around a recent real life nBits
    def test_random_solvetimes_for_up_ramp_hashrate(self):
        blocks = [
            (1, 600, 0x1802AEE8),
            (2, 710, 0x1802AD91),
            (3, 727, 0x1802ABF8),
            (4, 1139, 0x1802AB73),
            (5, 1619, 0x1802AB20),
            (6, 2004, 0x1802AA89),
            (7, 2146, 0x1802A94B),
            (8, 6499, 0x1802B39C),
            (9, 6499, 0x1802B1F2),
            (10, 7057, 0x1802B1D4),
            (11, 7541, 0x1802B181),
            (12, 7636, 0x1802B01C),
            (13, 8044, 0x1802AF93),
            (14, 8630, 0x1802AF8B),
            (15, 9091, 0x1802AF28),
            (16, 9108, 0x1802AD8F),
            (17, 9727, 0x1802AD9C),
            (18, 10299, 0x1802AD88),
            (19, 10878, 0x1802AD7B),
            (20, 10948, 0x1802AC07),
            (21, 12101, 0x1802AD89),
            (22, 12249, 0x1802AC4D),
            (23, 12586, 0x1802AB95),
            (24, 12719, 0x1802AA4E),
            (25, 12894, 0x1802A925),
            (26, 12940, 0x1802A7A4),
            (27, 13126, 0x1802A684),
            (28, 13164, 0x1802A4FD),
            (29, 13187, 0x1802A36D),
            (30, 13559, 0x1802A2CF),
            (31, 13603, 0x1802A14E),
            (32, 13874, 0x1802A06D),
            (33, 13982, 0x18029F19),
            (34, 14141, 0x18029DEA),
            (35, 14371, 0x18029CEB),
            (36, 14581, 0x18029BE0),
            (37, 14802, 0x18029ADF),
            (38, 15286, 0x18029A8E),
            (39, 15441, 0x1802995F),
            (40, 15619, 0x1802983E),
            (41, 15807, 0x18029727),
            (42, 15913, 0x180295D7),
            (43, 16033, 0x18029491),
            (44, 16098, 0x18029326),
            (45, 16155, 0x180291B8),
            (46, 16182, 0x18029036),
            (47, 16195, 0x18028EAB),
            (48, 16269, 0x18028D4A),
            (49, 16270, 0x18028BBB),
            (50, 16276, 0x18028A2D),
            (51, 16288, 0x180288A6),
            (52, 16358, 0x18028746),
            (53, 16706, 0x1802869D),
            (54, 16810, 0x18028556),
            (55, 16874, 0x180283F4),
            (56, 16980, 0x180282AC),
            (57, 17040, 0x18028147),
            (58, 17052, 0x18027FC5),
            (59, 17094, 0x18027E58),
            (60, 17172, 0x18027D02),
            (61, 17217, 0x18027B98),
            (62, 17323, 0x18027A56),
            (63, 17365, 0x180278EA),
            (64, 17382, 0x18027770),
            (65, 17516, 0x18027642),
            (66, 17636, 0x1802750C),
            (67, 17636, 0x1802738A),
            (68, 17637, 0x18027209),
            (69, 17703, 0x180270B0),
            (70, 17732, 0x18026F43),
            (71, 17804, 0x18026DF1),
            (72, 17804, 0x18026C72),
            (73, 17904, 0x18026B35),
            (74, 17987, 0x180269EC),
            (75, 18018, 0x18026883),
            (76, 18041, 0x18026715),
            (77, 18049, 0x180265A1),
            (78, 18050, 0x18026428),
            (79, 18058, 0x180262B3),
            (80, 18224, 0x180261A4),
            (81, 18230, 0x1802602F),
            (82, 18261, 0x18025ECD),
            (83, 18265, 0x18025D5B),
            (84, 18327, 0x18025C0D),
            (85, 18387, 0x18025ABD),
            (86, 18401, 0x18025952),
            (87, 18459, 0x18025804),
            (88, 18708, 0x1802572C),
            (89, 18716, 0x180255BF),
            (90, 18733, 0x1802545A),
            (91, 18778, 0x18025306),
            (92, 18959, 0x18025206),
            (93, 19058, 0x180250D6),
            (94, 19063, 0x18024F6A),
            (95, 19146, 0x18024E30),
            (96, 19317, 0x18024D2C),
            (97, 19613, 0x18024C74),
            (98, 19650, 0x18024B1F),
            (99, 19763, 0x180249FB),
            (100, 19772, 0x18024899),
            (101, 19888, 0x18024775),
            (102, 19929, 0x18024626),
            (103, 19955, 0x180244CF),
            (104, 20006, 0x18024387),
            (105, 20043, 0x18024239),
            (106, 20149, 0x18024113),
            (107, 20172, 0x18023FBD),
            (108, 20182, 0x18023E62),
            (109, 20219, 0x18023D15),
            (110, 20245, 0x18023BC2),
            (111, 20335, 0x18023A98),
            (112, 20345, 0x1802393E),
            (113, 20363, 0x180237EA),
            (114, 20366, 0x1802368D),
            (115, 20480, 0x18023574),
            (116, 20522, 0x1802342F),
            (117, 20526, 0x180232D5),
            (118, 20545, 0x18023187),
            (119, 20558, 0x18023033),
            (120, 20570, 0x18022EE1),
            (121, 20573, 0x18022D8B),
            (122, 20586, 0x18022C3A),
            (123, 20621, 0x18022AF8),
            (124, 20627, 0x180229A6),
            (125, 20921, 0x180228F8),
            (126, 20947, 0x180227B2),
            (127, 21056, 0x1802269C),
            (128, 21065, 0x1802254D),
            (129, 21086, 0x18022407),
            (130, 21108, 0x180222C2),
            (131, 21115, 0x18022174),
            (132, 21190, 0x1802204E),
            (133, 21285, 0x18021F33),
            (134, 21318, 0x18021DF8),
            (135, 21385, 0x18021CCF),
            (136, 21411, 0x18021B90),
            (137, 21433, 0x18021A4F),
            (138, 21512, 0x1802192F),
            (139, 21530, 0x180217F0),
            (140, 21584, 0x180216C3),
            (141, 21622, 0x1802158F),
            (142, 21641, 0x1802144F),
            (143, 21662, 0x18021314),
            (144, 21663, 0x180211CD),
            (145, 21666, 0x18021088),
            (146, 21681, 0x18020F4A),
            (147, 21705, 0x18020E13),
            (148, 21721, 0x18020CD7),
            (149, 21746, 0x18020BA2),
            (150, 21758, 0x18020A65),
            (151, 21758, 0x18020924),
            (152, 21775, 0x180207EC),
            (153, 21797, 0x180206B7),
            (154, 21928, 0x180205BE),
            (155, 22047, 0x180204BD),
            (156, 22047, 0x1802037F),
            (157, 22059, 0x18020248),
            (158, 22091, 0x1802011D),
            (159, 22109, 0x1801FFEA),
            (160, 22149, 0x1801FEC4),
            (161, 22160, 0x1801FD8E),
            (162, 22175, 0x1801FC5D),
            (163, 22190, 0x1801FB2C),
            (164, 22197, 0x1801F9F7),
            (165, 22200, 0x1801F8C0),
            (166, 22223, 0x1801F797),
            (167, 22262, 0x1801F674),
            (168, 22283, 0x1801F549),
            (169, 22291, 0x1801F41A),
            (170, 22416, 0x1801F326),
            (171, 22425, 0x1801F1F6),
            (172, 22470, 0x1801F0DB),
            (173, 22503, 0x1801EFB9),
            (174, 22516, 0x1801EE8E),
            (175, 22601, 0x1801ED8A),
            (176, 22669, 0x1801EC7C),
            (177, 22707, 0x1801EB60),
            (178, 22795, 0x1801EA5E),
            (179, 22797, 0x1801E930),
            (180, 22857, 0x1801E821),
            (181, 22888, 0x1801E705),
            (182, 22934, 0x1801E5EF),
            (183, 22935, 0x1801E4C5),
            (184, 22950, 0x1801E3A2),
            (185, 23086, 0x1801E2BC),
            (186, 23100, 0x1801E19A),
            (187, 23272, 0x1801E0C7),
            (188, 23279, 0x1801DFA3),
            (189, 23288, 0x1801DE80),
            (190, 23308, 0x1801DD63),
            (191, 23371, 0x1801DC5C),
            (192, 23455, 0x1801DB5F),
            (193, 23485, 0x1801DA49),
            (194, 23489, 0x1801D927),
            (195, 23503, 0x1801D80C),
            (196, 23590, 0x1801D712),
            (197, 23630, 0x1801D605),
            (198, 23654, 0x1801D4EE),
            (199, 23730, 0x1801D3F3),
            (200, 23759, 0x1801D2E0),
            (201, 23791, 0x1801D1D1),
            (202, 23806, 0x1801D0BA),
            (203, 23831, 0x1801CFA7),
            (204, 23837, 0x1801CE8D),
            (205, 23864, 0x1801CD7D),
            (206, 23864, 0x1801CC62),
            (207, 23893, 0x1801CB54),
            (208, 23931, 0x1801CA4A),
            (209, 23963, 0x1801C941),
            (210, 23971, 0x1801C82B),
            (211, 24002, 0x1801C720),
            (212, 24033, 0x1801C616),
            (213, 24114, 0x1801C526),
            (214, 24148, 0x1801C41E),
            (215, 24149, 0x1801C309),
            (216, 24207, 0x1801C20D),
            (217, 24215, 0x1801C0FD),
            (218, 24217, 0x1801BFEA),
            (219, 24275, 0x1801BEF0),
            (220, 24339, 0x1801BDFB),
            (221, 24342, 0x1801BCEA),
            (222, 24353, 0x1801BBDD),
            (223, 24368, 0x1801BAD3),
            (224, 24471, 0x1801B9F2),
            (225, 24527, 0x1801B8FC),
            (226, 24574, 0x1801B801),
            (227, 24582, 0x1801B6F6),
            (228, 24584, 0x1801B5EA),
            (229, 24593, 0x1801B4E0),
            (230, 24597, 0x1801B3D5),
            (231, 24611, 0x1801B2D0),
            (232, 24627, 0x1801B1CC),
            (233, 24631, 0x1801B0C3),
            (234, 24674, 0x1801AFCB),
            (235, 24689, 0x1801AEC8),
            (236, 24696, 0x1801ADC4),
            (237, 24734, 0x1801ACCC),
            (238, 24762, 0x1801ABCF),
            (239, 24774, 0x1801AACE),
            (240, 24864, 0x1801A9EF),
            (241, 24931, 0x1801A907),
            (242, 24932, 0x1801A803),
            (243, 25009, 0x1801A71F),
            (244, 25009, 0x1801A61C),
            (245, 25072, 0x1801A532),
            (246, 25137, 0x1801A44C),
            (247, 25160, 0x1801A353),
            (248, 25165, 0x1801A254),
            (249, 25170, 0x1801A154),
            (250, 25190, 0x1801A05C),
            (251, 25196, 0x18019F60),
            (252, 25285, 0x18019E86),
            (253, 25325, 0x18019D99),
            (254, 25327, 0x18019C9B),
            (255, 25330, 0x18019B9E),
            (256, 25330, 0x18019AA2),
            (257, 25363, 0x180199B3),
            (258, 25366, 0x180198B8),
            (259, 25400, 0x180197CC),
            (260, 25426, 0x180196DC),
            (261, 25448, 0x180195EA),
            (262, 25452, 0x180194F3),
            (263, 25518, 0x18019415),
            (264, 25519, 0x1801931E),
            (265, 25522, 0x18019227),
            (266, 25529, 0x18019133),
            (267, 25548, 0x18019043),
            (268, 25550, 0x18018F4E),
            (269, 25553, 0x18018E5A),
            (270, 25575, 0x18018D6E),
            (271, 25586, 0x18018C7F),
            (272, 25643, 0x18018BA2),
            (273, 25644, 0x18018AAF),
            (274, 25647, 0x180189BE),
            (275, 25652, 0x180188CD),
            (276, 25652, 0x180187DC),
            (277, 25664, 0x180186F0),
            (278, 25690, 0x1801860A),
            (279, 25716, 0x18018525),
            (280, 25751, 0x18018444),
            (281, 25795, 0x18018366),
            (282, 25802, 0x1801827A),
            (283, 25820, 0x18018195),
            (284, 25908, 0x180180CA),
            (285, 25922, 0x18017FE2),
            (286, 25952, 0x18017F02),
            (287, 25972, 0x18017E1F),
            (288, 25993, 0x18017D3D),
            (289, 26018, 0x18017C5C),
            (290, 26033, 0x18017B77),
            (291, 26075, 0x18017A9E),
            (292, 26111, 0x180179C3),
            (293, 26119, 0x180178DF),
            (294, 26119, 0x180177F6),
            (295, 26138, 0x18017717),
            (296, 26169, 0x1801763C),
            (297, 26231, 0x1801756E),
            (298, 26246, 0x1801748D),
            (299, 26247, 0x180173A8),
            (300, 26308, 0x180172DB),
            (301, 26309, 0x180171F7),
            (302, 26364, 0x18017128),
            (303, 26397, 0x18017050),
            (304, 26434, 0x18016F7C),
            (305, 26443, 0x18016E9D),
            (306, 26458, 0x18016DC1),
            (307, 26464, 0x18016CE3),
            (308, 26484, 0x18016C09),
            (309, 26488, 0x18016B2B),
            (310, 26544, 0x18016A60),
            (311, 26572, 0x1801698B),
            (312, 26588, 0x180168B3),
            (313, 26641, 0x180167E8),
            (314, 26650, 0x1801670D),
            (315, 26650, 0x18016630),
            (316, 26686, 0x18016562),
            (317, 26687, 0x18016485),
            (318, 26695, 0x180163AC),
            (319, 26704, 0x180162D4),
            (320, 26715, 0x180161FD),
            (321, 26721, 0x18016125),
            (322, 26740, 0x18016053),
            (323, 26761, 0x18015F80),
            (324, 26772, 0x18015EAC),
            (325, 26806, 0x18015DE0),
            (326, 26828, 0x18015D10),
            (327, 26835, 0x18015C3B),
            (328, 26855, 0x18015B6B),
            (329, 26865, 0x18015A9A),
            (330, 26874, 0x180159C6),
            (331, 26890, 0x180158F7),
            (332, 26893, 0x18015822),
            (333, 26901, 0x18015751),
            (334, 26904, 0x18015680),
            (335, 26922, 0x180155B4),
            (336, 26948, 0x180154EB),
            (337, 26959, 0x1801541E),
            (338, 26961, 0x1801534E),
            (339, 26970, 0x18015280),
            (340, 26982, 0x180151B4),
            (341, 27008, 0x180150EE),
            (342, 27013, 0x18015021),
            (343, 27033, 0x18014F59),
            (344, 27037, 0x18014E8C),
            (345, 27045, 0x18014DC2),
            (346, 27047, 0x18014CF5),
            (347, 27048, 0x18014C29),
            (348, 27070, 0x18014B64),
            (349, 27105, 0x18014AA4),
            (350, 27116, 0x180149DD),
            (351, 27145, 0x1801491C),
            (352, 27153, 0x18014854),
            (353, 27169, 0x18014790),
            (354, 27179, 0x180146CB),
            (355, 27189, 0x18014605),
            (356, 27192, 0x1801453D),
            (357, 27195, 0x18014476),
            (358, 27248, 0x180143C0),
            (359, 27266, 0x180142FF),
            (360, 27267, 0x18014239),
            (361, 27289, 0x1801417A),
            (362, 27294, 0x180140B6),
            (363, 27309, 0x18013FF6),
            (364, 27314, 0x18013F32),
            (365, 27342, 0x18013E77),
            (366, 27345, 0x18013DB4),
            (367, 27366, 0x18013CF7),
            (368, 27377, 0x18013C38),
            (369, 27378, 0x18013B76),
            (370, 27383, 0x18013AB5),
            (371, 27383, 0x180139F4),
            (372, 27393, 0x18013936),
            (373, 27403, 0x18013878),
            (374, 27417, 0x180137BD),
            (375, 27420, 0x180136FD),
            (376, 27422, 0x1801363F),
            (377, 27455, 0x1801358B),
            (378, 27460, 0x180134CD),
            (379, 27484, 0x18013418),
            (380, 27485, 0x18013359),
            (381, 27500, 0x180132A1),
            (382, 27513, 0x180131E9),
            (383, 27533, 0x18013132),
            (384, 27581, 0x18013086),
            (385, 27581, 0x18012FCA),
            (386, 27586, 0x18012F10),
            (387, 27651, 0x18012E6A),
            (388, 27664, 0x18012DB4),
            (389, 27671, 0x18012CFC),
            (390, 27676, 0x18012C45),
            (391, 27687, 0x18012B8F),
            (392, 27690, 0x18012AD7),
            (393, 27699, 0x18012A22),
            (394, 27715, 0x1801296F),
            (395, 27728, 0x180128BC),
            (396, 27742, 0x1801280A),
            (397, 27743, 0x18012754),
            (398, 27760, 0x180126A3),
            (399, 27761, 0x180125ED),
            (400, 27767, 0x1801253B),
            (401, 27776, 0x18012489),
            (402, 27777, 0x180123D5),
            (403, 27790, 0x18012325),
            (404, 27796, 0x18012274),
            (405, 27801, 0x180121C2),
            (406, 27806, 0x18012112),
            (407, 27832, 0x18012067),
            (408, 27853, 0x18011FBB),
            (409, 27854, 0x18011F0A),
            (410, 27883, 0x18011E63),
            (411, 27884, 0x18011DB2),
            (412, 27902, 0x18011D07),
            (413, 27903, 0x18011C58),
            (414, 27909, 0x18011BAA),
            (415, 27934, 0x18011B03),
            (416, 27939, 0x18011A56),
            (417, 27939, 0x180119A9),
            (418, 27970, 0x18011904),
            (419, 27980, 0x18011859),
            (420, 27989, 0x180117AF),
            (421, 27999, 0x18011706),
            (422, 28002, 0x1801165B),
            (423, 28009, 0x180115B1),
            (424, 28026, 0x1801150B),
            (425, 28067, 0x1801146C),
            (426, 28083, 0x180113C7),
            (427, 28111, 0x18011325),
            (428, 28116, 0x1801127D),
            (429, 28178, 0x180111E5),
            (430, 28179, 0x1801113D),
            (431, 28191, 0x18011098),
            (432, 28191, 0x18010FEF),
            (433, 28198, 0x18010F49),
            (434, 28205, 0x18010EA4),
            (435, 28211, 0x18010DFF),
            (436, 28257, 0x18010D66),
            (437, 28272, 0x18010CC4),
            (438, 28276, 0x18010C1F),
            (439, 28281, 0x18010B7B),
            (440, 28290, 0x18010AD9),
            (441, 28311, 0x18010A3B),
            (442, 28312, 0x18010997),
            (443, 28320, 0x180108F5),
            (444, 28323, 0x18010854),
            (445, 28339, 0x180107B5),
            (446, 28358, 0x18010718),
            (447, 28371, 0x18010679),
            (448, 28376, 0x180105D8),
            (449, 28378, 0x18010538),
            (450, 28385, 0x18010499),
            (451, 28397, 0x180103FC),
            (452, 28402, 0x1801035D),
            (453, 28403, 0x180102BD),
            (454, 28413, 0x18010221),
            (455, 28415, 0x18010182),
            (456, 28425, 0x180100E6),
            (457, 28433, 0x1801004A),
            (458, 28464, 0x1800FFB4),
            (459, 28468, 0x1800FF18),
            (460, 28470, 0x1800FE7B),
            (461, 28474, 0x1800FDDF),
            (462, 28502, 0x1800FD4A),
            (463, 28512, 0x1800FCB1),
            (464, 28520, 0x1800FC17),
            (465, 28531, 0x1800FB80),
            (466, 28535, 0x1800FAE5),
            (467, 28544, 0x1800FA4E),
            (468, 28571, 0x1800F9BA),
            (469, 28602, 0x1800F929),
            (470, 28615, 0x1800F892),
            (471, 28628, 0x1800F7FC),
            (472, 28635, 0x1800F765),
            (473, 28637, 0x1800F6CE),
            (474, 28639, 0x1800F637),
            (475, 28645, 0x1800F5A0),
            (476, 28660, 0x1800F50D),
            (477, 28661, 0x1800F476),
            (478, 28675, 0x1800F3E3),
            (479, 28690, 0x1800F351),
            (480, 28719, 0x1800F2C2),
            (481, 28753, 0x1800F235),
            (482, 28754, 0x1800F1A1),
            (483, 28754, 0x1800F10C),
            (484, 28780, 0x1800F07E),
            (485, 28784, 0x1800EFEB),
            (486, 28784, 0x1800EF57),
            (487, 28820, 0x1800EECC),
            (488, 28825, 0x1800EE3B),
            (489, 28833, 0x1800EDAA),
            (490, 28847, 0x1800ED1B),
            (491, 28869, 0x1800EC8F),
            (492, 28872, 0x1800EBFE),
            (493, 28895, 0x1800EB72),
            (494, 28897, 0x1800EAE2),
            (495, 28898, 0x1800EA51),
            (496, 28917, 0x1800E9C6),
            (497, 28934, 0x1800E93A),
            (498, 28934, 0x1800E8AA),
            (499, 28947, 0x1800E81F),
            (500, 28963, 0x1800E793),
            (501, 29008, 0x1800E710),
            (502, 29008, 0x1800E682),
            (503, 29017, 0x1800E5F6),
            (504, 29033, 0x1800E56D),
            (505, 29037, 0x1800E4E0),
            (506, 29043, 0x1800E454),
            (507, 29079, 0x1800E3D1),
            (508, 29086, 0x1800E346),
            (509, 29088, 0x1800E2BB),
            (510, 29104, 0x1800E233),
            (511, 29107, 0x1800E1A9),
            (512, 29115, 0x1800E120),
            (513, 29132, 0x1800E099),
            (514, 29143, 0x1800E012),
            (515, 29154, 0x1800DF8A),
            (516, 29160, 0x1800DF02),
            (517, 29160, 0x1800DE79),
            (518, 29191, 0x1800DDF8),
            (519, 29195, 0x1800DD70),
            (520, 29204, 0x1800DCE9),
            (521, 29208, 0x1800DC62),
            (522, 29213, 0x1800DBDC),
            (523, 29266, 0x1800DB61),
            (524, 29288, 0x1800DADF),
            (525, 29292, 0x1800DA59),
            (526, 29304, 0x1800D9D6),
            (527, 29304, 0x1800D950),
            (528, 29304, 0x1800D8CA),
            (529, 29319, 0x1800D849),
            (530, 29328, 0x1800D7C5),
            (531, 29329, 0x1800D741),
            (532, 29333, 0x1800D6BD),
            (533, 29336, 0x1800D63A),
            (534, 29376, 0x1800D5BF),
            (535, 29383, 0x1800D53D),
            (536, 29404, 0x1800D4BE),
            (537, 29404, 0x1800D43C),
            (538, 29413, 0x1800D3BB),
            (539, 29417, 0x1800D33B),
            (540, 29433, 0x1800D2BC),
            (541, 29442, 0x1800D23C),
            (542, 29466, 0x1800D1C0),
            (543, 29484, 0x1800D143),
            (544, 29489, 0x1800D0C3),
            (545, 29498, 0x1800D045),
            (546, 29518, 0x1800CFC9),
            (547, 29520, 0x1800CF4A),
            (548, 29536, 0x1800CECE),
            (549, 29538, 0x1800CE4F),
            (550, 29564, 0x1800CDD6),
            (551, 29640, 0x1800CD68),
            (552, 29644, 0x1800CCEB),
            (553, 29647, 0x1800CC6C),
            (554, 29688, 0x1800CBF8),
            (555, 29696, 0x1800CB7C),
            (556, 29697, 0x1800CAFF),
            (557, 29737, 0x1800CA8B),
            (558, 29769, 0x1800CA15),
            (559, 29787, 0x1800C99D),
            (560, 29788, 0x1800C921),
            (561, 29795, 0x1800C8A7),
            (562, 29798, 0x1800C82C),
            (563, 29805, 0x1800C7B2),
            (564, 29827, 0x1800C73C),
            (565, 29829, 0x1800C6C2),
            (566, 29837, 0x1800C649),
            (567, 29881, 0x1800C5D8),
            (568, 29892, 0x1800C561),
            (569, 29908, 0x1800C4EB),
            (570, 29910, 0x1800C472),
            (571, 29926, 0x1800C3FD),
            (572, 29930, 0x1800C385),
            (573, 29932, 0x1800C30D),
            (574, 29989, 0x1800C2A0),
            (575, 29994, 0x1800C22A),
            (576, 30008, 0x1800C1B6),
            (577, 30015, 0x1800C140),
            (578, 30020, 0x1800C0CA),
            (579, 30028, 0x1800C055),
            (580, 30029, 0x1800BFDF),
            (581, 30032, 0x1800BF6A),
            (582, 30032, 0x1800BEF4),
            (583, 30048, 0x1800BE82),
            (584, 30062, 0x1800BE0F),
            (585, 30063, 0x1800BD9A),
            (586, 30069, 0x1800BD27),
            (587, 30074, 0x1800BCB4),
            (588, 30074, 0x1800BC40),
            (589, 30096, 0x1800BBD0),
            (590, 30099, 0x1800BB5D),
            (591, 30108, 0x1800BAEC),
            (592, 30115, 0x1800BA79),
            (593, 30121, 0x1800BA08),
            (594, 30150, 0x1800B99B),
            (595, 30150, 0x1800B929),
            (596, 30152, 0x1800B8B7),
            (597, 30158, 0x1800B847),
            (598, 30158, 0x1800B7D5),
            (599, 30165, 0x1800B765),
            (600, 30169, 0x1800B6F5),
            (601, 30171, 0x1800B685),
            (602, 30189, 0x1800B619),
            (603, 30190, 0x1800B5A8),
            (604, 30199, 0x1800B53A),
            (605, 30201, 0x1800B4CA),
            (606, 30201, 0x1800B45C),
            (607, 30204, 0x1800B3EC),
            (608, 30205, 0x1800B37E),
            (609, 30215, 0x1800B311),
            (610, 30218, 0x1800B2A4),
            (611, 30229, 0x1800B238),
            (612, 30230, 0x1800B1CA),
            (613, 30234, 0x1800B15D),
            (614, 30235, 0x1800B0F0),
            (615, 30257, 0x1800B087),
            (616, 30262, 0x1800B01B),
            (617, 30271, 0x1800AFB0),
            (618, 30273, 0x1800AF44),
            (619, 30296, 0x1800AEDC),
            (620, 30310, 0x1800AE72),
            (621, 30311, 0x1800AE07),
            (622, 30320, 0x1800AD9D),
            (623, 30324, 0x1800AD33),
            (624, 30327, 0x1800ACC9),
            (625, 30329, 0x1800AC5F),
            (626, 30374, 0x1800ABFC),
            (627, 30374, 0x1800AB92),
            (628, 30378, 0x1800AB2A),
            (629, 30395, 0x1800AAC4),
            (630, 30395, 0x1800AA5A),
            (631, 30395, 0x1800A9F2),
            (632, 30395, 0x1800A98A),
            (633, 30399, 0x1800A922),
            (634, 30409, 0x1800A8BC),
            (635, 30412, 0x1800A855),
            (636, 30414, 0x1800A7EE),
            (637, 30420, 0x1800A788),
            (638, 30420, 0x1800A721),
            (639, 30431, 0x1800A6BC),
            (640, 30432, 0x1800A656),
            (641, 30436, 0x1800A5F0),
            (642, 30450, 0x1800A58C),
            (643, 30453, 0x1800A527),
            (644, 30454, 0x1800A4C2),
            (645, 30469, 0x1800A45F),
            (646, 30509, 0x1800A401),
            (647, 30521, 0x1800A39E),
            (648, 30545, 0x1800A33D),
            (649, 30548, 0x1800A2DA),
            (650, 30561, 0x1800A278),
            (651, 30567, 0x1800A215),
            (652, 30571, 0x1800A1B2),
            (653, 30590, 0x1800A151),
            (654, 30590, 0x1800A0EE),
            (655, 30590, 0x1800A08B),
            (656, 30593, 0x1800A029),
            (657, 30624, 0x18009FCC),
            (658, 30629, 0x18009F6A),
            (659, 30641, 0x18009F0A),
            (660, 30644, 0x18009EA9),
            (661, 30656, 0x18009E49),
            (662, 30659, 0x18009DE8),
            (663, 30670, 0x18009D89),
            (664, 30693, 0x18009D2C),
            (665, 30702, 0x18009CCC),
            (666, 30706, 0x18009C6C),
            (667, 30716, 0x18009C0E),
            (668, 30732, 0x18009BB0),
            (669, 30773, 0x18009B57),
            (670, 30773, 0x18009AF7),
            (671, 30775, 0x18009A98),
            (672, 30775, 0x18009A39),
            (673, 30794, 0x180099DE),
            (674, 30802, 0x18009980),
            (675, 30802, 0x18009921),
            (676, 30809, 0x180098C5),
            (677, 30815, 0x18009867),
            (678, 30823, 0x1800980B),
            (679, 30842, 0x180097B0),
            (680, 30846, 0x18009753),
            (681, 30854, 0x180096F7),
            (682, 30858, 0x1800969B),
            (683, 30860, 0x1800963F),
            (684, 30868, 0x180095E3),
            (685, 30868, 0x18009587),
            (686, 30874, 0x1800952C),
            (687, 30878, 0x180094D1),
            (688, 30885, 0x18009476),
            (689, 30887, 0x1800941B),
            (690, 30888, 0x180093C0),
            (691, 30892, 0x18009365),
            (692, 30906, 0x1800930D),
            (693, 30914, 0x180092B3),
            (694, 30918, 0x18009259),
            (695, 30928, 0x18009201),
            (696, 30930, 0x180091A7),
            (697, 30939, 0x1800914F),
            (698, 30942, 0x180090F6),
            (699, 30968, 0x180090A0),
            (700, 30968, 0x18009047),
            (701, 30986, 0x18008FF1),
            (702, 31037, 0x18008FA0),
            (703, 31043, 0x18008F48),
            (704, 31060, 0x18008EF2),
            (705, 31078, 0x18008E9D),
            (706, 31078, 0x18008E45),
            (707, 31092, 0x18008DF0),
            (708, 31092, 0x18008D98),
            (709, 31092, 0x18008D41),
            (710, 31112, 0x18008CED),
            (711, 31116, 0x18008C97),
            (712, 31119, 0x18008C40),
            (713, 31130, 0x18008BEC),
            (714, 31135, 0x18008B96),
            (715, 31162, 0x18008B44),
            (716, 31180, 0x18008AF1),
            (717, 31183, 0x18008A9C),
            (718, 31183, 0x18008A46),
            (719, 31185, 0x180089F1),
            (720, 31203, 0x1800899F),
            (721, 31205, 0x1800894A),
            (722, 31205, 0x180088F6),
            (723, 31231, 0x180088A5),
            (724, 31247, 0x18008853),
            (725, 31259, 0x18008801),
            (726, 31262, 0x180087AE),
            (727, 31262, 0x1800875A),
            (728, 31262, 0x18008707),
            (729, 31264, 0x180086B4),
            (730, 31264, 0x18008660),
            (731, 31277, 0x1800860F),
            (732, 31286, 0x180085BE),
            (733, 31292, 0x1800856D),
            (734, 31309, 0x1800851D),
            (735, 31311, 0x180084CB),
            (736, 31311, 0x18008479),
            (737, 31311, 0x18008428),
            (738, 31311, 0x180083D6),
            (739, 31312, 0x18008385),
            (740, 31318, 0x18008335),
            (741, 31322, 0x180082E5),
            (742, 31343, 0x18008297),
            (743, 31343, 0x18008247),
            (744, 31364, 0x180081F9),
            (745, 31365, 0x180081A9),
            (746, 31367, 0x1800815A),
            (747, 31373, 0x1800810B),
            (748, 31374, 0x180080BB),
            (749, 31377, 0x1800806C),
            (750, 31391, 0x1800801F),
            (751, 31392, 0x177FD0F4),
            (752, 31397, 0x177F82CD),
            (753, 31398, 0x177F3451),
            (754, 31399, 0x177EE62B),
            (755, 31408, 0x177E995D),
            (756, 31411, 0x177E4B8C),
            (757, 31427, 0x177E0015),
            (758, 31442, 0x177DB448),
            (759, 31446, 0x177D6779),
            (760, 31459, 0x177D1BAC),
            (761, 31464, 0x177CCF89),
            (762, 31468, 0x177C8366),
            (763, 31469, 0x177C36ED),
            (764, 31470, 0x177BEA1F),
            (765, 31472, 0x177B9E52),
            (766, 31476, 0x177B52DA),
            (767, 31479, 0x177B070D),
            (768, 31483, 0x177ABBEC),
            (769, 31492, 0x177A7176),
            (770, 31517, 0x177A295A),
            (771, 31521, 0x1779DE8E),
            (772, 31521, 0x1779936D),
            (773, 31528, 0x1779494D),
            (774, 31529, 0x1778FED7),
            (775, 31530, 0x1778B4B8),
            (776, 31532, 0x17786A98),
            (777, 31539, 0x17782124),
            (778, 31540, 0x1777D75A),
            (779, 31542, 0x17778DE6),
            (780, 31543, 0x17774472),
            (781, 31556, 0x1776FD01),
            (782, 31560, 0x1776B3E3),
            (783, 31562, 0x17766B70),
            (784, 31574, 0x177623FF),
            (785, 31591, 0x1775DD3A),
            (786, 31605, 0x1775961F),
            (787, 31617, 0x17754F5A),
            (788, 31617, 0x1775073D),
            (789, 31617, 0x1774BF21),
            (790, 31618, 0x1774775A),
            (791, 31618, 0x17742F93),
            (792, 31625, 0x1773E97A),
            (793, 31639, 0x1773A360),
            (794, 31659, 0x17735E9E),
            (795, 31659, 0x177317D9),
            (796, 31660, 0x1772D114),
            (797, 31667, 0x17728B51),
            (798, 31668, 0x17724537),
            (799, 31671, 0x1771FF1E),
            (800, 31680, 0x1771BA06),
            (801, 31685, 0x17717498),
            (802, 31685, 0x17712ED5),
            (803, 31685, 0x1770E911),
            (804, 31694, 0x1770A4A5),
            (805, 31700, 0x17706039),
            (806, 31702, 0x17701B77),
            (807, 31703, 0x176FD6B5),
            (808, 31714, 0x176F92F5),
            (809, 31715, 0x176F4E88),
            (810, 31727, 0x176F0B74),
            (811, 31739, 0x176EC85F),
            (812, 31745, 0x176E84F5),
            (813, 31746, 0x176E4134),
            (814, 31747, 0x176DFD74),
            (815, 31750, 0x176DBA09),
            (816, 31757, 0x176D774B),
            (817, 31759, 0x176D348C),
            (818, 31759, 0x176CF177),
            (819, 31767, 0x176CAF0E),
            (820, 31787, 0x176C6EA8),
            (821, 31789, 0x176C2C3F),
            (822, 31794, 0x176BEA2C),
            (823, 31794, 0x176BA7C3),
            (824, 31805, 0x176B6708),
            (825, 31807, 0x176B24F5),
            (826, 31808, 0x176AE338),
            (827, 31811, 0x176AA226),
            (828, 31815, 0x176A6115),
            (829, 31817, 0x176A1FAD),
            (830, 31827, 0x1769DF9D),
            (831, 31830, 0x17699EE2),
            (832, 31844, 0x17695F28),
            (833, 31852, 0x17691F6E),
            (834, 31879, 0x1768E1B7),
            (835, 31884, 0x1768A1FD),
            (836, 31886, 0x17686197),
            (837, 31903, 0x1768238A),
            (838, 31905, 0x1767E37B),
            (839, 31911, 0x1767A46C),
            (840, 31912, 0x176764B2),
            (841, 31914, 0x1767254E),
            (842, 31918, 0x1766E696),
            (843, 31934, 0x1766A8DF),
            (844, 31940, 0x17666A7C),
            (845, 31947, 0x17662C1A),
            (846, 31951, 0x1765EDB7),
            (847, 31951, 0x1765AF54),
            (848, 31952, 0x1765709C),
            (849, 31954, 0x176532E5),
            (850, 31954, 0x1764F483),
            (851, 31955, 0x1764B676),
            (852, 31957, 0x176478BF),
            (853, 31964, 0x17643BB4),
            (854, 31964, 0x1763FE53),
            (855, 31972, 0x1763C19E),
            (856, 31977, 0x176384E8),
            (857, 31981, 0x176347DD),
            (858, 31984, 0x17630B28),
            (859, 31985, 0x1762CE73),
            (860, 31988, 0x176291BE),
            (861, 31989, 0x1762555E),
            (862, 32015, 0x17621BAE),
            (863, 32019, 0x1761DFFA),
            (864, 32019, 0x1761A39B),
            (865, 32023, 0x176167E7),
            (866, 32023, 0x17612BDD),
            (867, 32027, 0x1760F080),
            (868, 32033, 0x1760B5CE),
            (869, 32037, 0x17607AC6),
            (870, 32050, 0x17604069),
            (871, 32052, 0x176005B7),
            (872, 32052, 0x175FCAAF),
            (873, 32054, 0x175F8FA8),
            (874, 32057, 0x175F554B),
            (875, 32058, 0x175F1AEF),
            (876, 32064, 0x175EE0E9),
            (877, 32064, 0x175EA68D),
            (878, 32067, 0x175E6C86),
            (879, 32071, 0x175E32D6),
            (880, 32072, 0x175DF925),
            (881, 32072, 0x175DBF75),
            (882, 32077, 0x175D861A),
            (883, 32077, 0x175D4C6A),
            (884, 32091, 0x175D1466),
            (885, 32094, 0x175CDBB8),
            (886, 32116, 0x175CA4B6),
            (887, 32129, 0x175C6CB3),
            (888, 32130, 0x175C3404),
            (889, 32135, 0x175BFBAB),
            (890, 32141, 0x175BC3A8),
            (891, 32162, 0x175B8CFC),
            (892, 32164, 0x175B54F9),
            (893, 32170, 0x175B1D4C),
            (894, 32172, 0x175AE548),
            (895, 32179, 0x175AADF1),
            (896, 32182, 0x175A7699),
            (897, 32189, 0x175A3F42),
            (898, 32189, 0x175A07EB),
            (899, 32189, 0x1759D03D),
            (900, 32192, 0x1759993C),
            (901, 32193, 0x1759623A),
            (902, 32197, 0x17592B39),
            (903, 32203, 0x1758F4E3),
            (904, 32204, 0x1758BE37),
            (905, 32207, 0x175887E1),
            (906, 32209, 0x1758518B),
            (907, 32222, 0x17581C37),
            (908, 32227, 0x1757E637),
            (909, 32234, 0x1757B0E3),
            (910, 32234, 0x17577A8D),
            (911, 32248, 0x1757463A),
            (912, 32254, 0x17571090),
            (913, 32269, 0x1756DC93),
            (914, 32270, 0x1756A693),
            (915, 32274, 0x17567195),
            (916, 32276, 0x17563C97),
            (917, 32289, 0x17560844),
            (918, 32292, 0x1755D3C6),
            (919, 32294, 0x17559F49),
            (920, 32304, 0x17556B77),
            (921, 32305, 0x17553724),
            (922, 32308, 0x175502FC),
            (923, 32309, 0x1754CED5),
            (924, 32313, 0x17549B2E),
            (925, 32340, 0x1754698A),
            (926, 32340, 0x175435B8),
            (927, 32344, 0x1754023C),
            (928, 32344, 0x1753CEC0),
            (929, 32344, 0x17539B44),
            (930, 32346, 0x175367F3),
            (931, 32352, 0x1753354E),
            (932, 32354, 0x17530252),
            (933, 32354, 0x1752CF57),
            (934, 32358, 0x17529CDD),
            (935, 32358, 0x17526A0C),
            (936, 32360, 0x17523767),
            (937, 32362, 0x17520542),
            (938, 32362, 0x1751D2C8),
            (939, 32362, 0x1751A04E),
            (940, 32399, 0x17517159),
            (941, 32403, 0x17513FB5),
            (942, 32403, 0x17510D90),
            (943, 32405, 0x1750DC18),
            (944, 32407, 0x1750AA74),
            (945, 32422, 0x17507A28),
            (946, 32424, 0x175048AF),
            (947, 32433, 0x1750180D),
            (948, 32434, 0x174FE6EA),
            (949, 32440, 0x174FB61C),
            (950, 32445, 0x174F85A5),
            (951, 32455, 0x174F5584),
            (952, 32456, 0x174F24E2),
            (953, 32458, 0x174EF43F),
            (954, 32459, 0x174EC3C8),
            (955, 32472, 0x174E9453),
            (956, 32483, 0x174E64DD),
            (957, 32488, 0x174E3511),
            (958, 32499, 0x174E05C7),
            (959, 32519, 0x174DD77E),
            (960, 32521, 0x174DA7B2),
            (961, 32521, 0x174D77E7),
            (962, 32523, 0x174D4871),
            (963, 32535, 0x174D19D2),
            (964, 32536, 0x174CEA5C),
            (965, 32537, 0x174CBB11),
            (966, 32537, 0x174C8BF2),
            (967, 32545, 0x174C5D53),
            (968, 32557, 0x174C2F35),
            (969, 32565, 0x174C0116),
            (970, 32566, 0x174BD24C),
            (971, 32569, 0x174BA3D8),
            (972, 32572, 0x174B758F),
            (973, 32575, 0x174B471B),
            (974, 32592, 0x174B1A29),
            (975, 32595, 0x174AEC36),
            (976, 32598, 0x174ABE43),
            (977, 32601, 0x174A907B),
            (978, 32601, 0x174A6287),
            (979, 32610, 0x174A356B),
            (980, 32610, 0x174A07CD),
            (981, 32614, 0x1749DA86),
            (982, 32645, 0x1749AF6C),
            (983, 32654, 0x174982A6),
            (984, 32660, 0x174955B4),
            (985, 32675, 0x174929C4),
            (986, 32684, 0x1748FD53),
            (987, 32699, 0x1748D18E),
            (988, 32705, 0x1748A51D),
            (989, 32706, 0x17487881),
            (990, 32709, 0x17484C10),
            (991, 32711, 0x17481F9F),
            (992, 32738, 0x1747F55C),
            (993, 32740, 0x1747C917),
            (994, 32743, 0x17479CFC),
            (995, 32746, 0x17477136),
            (996, 32747, 0x17474546),
            (997, 32753, 0x174719AC),
            (998, 32754, 0x1746EDE7),
            (999, 32760, 0x1746C2CD),
            (1000, 32765, 0x17469789),
        ]

        self.validate_blocksequence(1, 0, 0x1802AEE8, blocks)

    # Deterministically random solvetimes for down-ramping hashrate around a recent real life nBits
    def test_random_solvetimes_for_down_ramping_hashrate(self):
        blocks = [
            (1, 600, 0x1802AEE8),
            (2, 710, 0x1802AD91),
            (3, 727, 0x1802ABF8),
            (4, 1139, 0x1802AB73),
            (5, 1619, 0x1802AB20),
            (6, 2004, 0x1802AA89),
            (7, 2146, 0x1802A94B),
            (8, 6499, 0x1802B39C),
            (9, 6499, 0x1802B1F2),
            (10, 7057, 0x1802B1D4),
            (11, 8995, 0x1802B58D),
            (12, 9375, 0x1802B4EE),
            (13, 11007, 0x1802B7D3),
            (14, 13351, 0x1802BCB8),
            (15, 15197, 0x1802C03E),
            (16, 15265, 0x1802BEBB),
            (17, 17743, 0x1802C40E),
            (18, 20031, 0x1802C8DE),
            (19, 22347, 0x1802CDCE),
            (20, 22629, 0x1802CCE4),
            (21, 33006, 0x1802E994),
            (22, 34344, 0x1802EBCA),
            (23, 37377, 0x1802F31E),
            (24, 38580, 0x1802F4F1),
            (25, 40155, 0x1802F7E8),
            (26, 40575, 0x1802F75D),
            (27, 42255, 0x1802FAA7),
            (28, 42600, 0x1802F9DE),
            (29, 42810, 0x1802F8AF),
            (30, 46161, 0x1803011F),
            (31, 46873, 0x18030177),
            (32, 51209, 0x18030D12),
            (33, 52937, 0x1803109D),
            (34, 55489, 0x180316C4),
            (35, 59169, 0x18032096),
            (36, 62537, 0x18032984),
            (37, 66073, 0x18033318),
            (38, 73825, 0x18034AE9),
            (39, 76309, 0x1803514B),
            (40, 79161, 0x180358FF),
            (41, 83871, 0x1803673B),
            (42, 86541, 0x18036E7C),
            (43, 89551, 0x18037704),
            (44, 91196, 0x18037ABC),
            (45, 92636, 0x18037DBE),
            (46, 93316, 0x18037E07),
            (47, 93646, 0x18037D10),
            (48, 95501, 0x1803818F),
            (49, 95526, 0x18037F7C),
            (50, 95681, 0x18037DE7),
            (51, 96119, 0x18037D50),
            (52, 98645, 0x1803843E),
            (53, 111173, 0x1803B056),
            (54, 114929, 0x1803BC5F),
            (55, 117245, 0x1803C2FC),
            (56, 121067, 0x1803CF82),
            (57, 123239, 0x1803D5AF),
            (58, 123671, 0x1803D508),
            (59, 125195, 0x1803D8AB),
            (60, 128027, 0x1803E189),
            (61, 130274, 0x1803E81E),
            (62, 135475, 0x1803FAC1),
            (63, 137533, 0x180400BD),
            (64, 138366, 0x180401B4),
            (65, 144932, 0x18041A91),
            (66, 150854, 0x18043142),
            (67, 150854, 0x18042EAB),
            (68, 150910, 0x18042C58),
            (69, 154186, 0x180437E2),
            (70, 155628, 0x18043B88),
            (71, 160276, 0x18044D49),
            (72, 160332, 0x18044AE2),
            (73, 166788, 0x18046509),
            (74, 172100, 0x18047A86),
            (75, 174100, 0x180480FD),
            (76, 175572, 0x18048509),
            (77, 176140, 0x180484E1),
            (78, 176220, 0x18048278),
            (79, 176748, 0x18048224),
            (80, 187420, 0x1804B1C2),
            (81, 187933, 0x1804B157),
            (82, 190498, 0x1804BAD9),
            (83, 190849, 0x1804B9A4),
            (84, 195934, 0x1804CF9C),
            (85, 200839, 0x1804E50E),
            (86, 201973, 0x1804E7C0),
            (87, 206689, 0x1804FCA6),
            (88, 226903, 0x18056506),
            (89, 227605, 0x18056596),
            (90, 229036, 0x18056A38),
            (91, 233616, 0x18058096),
            (92, 251736, 0x1805E733),
            (93, 261656, 0x180620B3),
            (94, 262156, 0x18062012),
            (95, 270486, 0x1806516B),
            (96, 287656, 0x1806C070),
            (97, 317296, 0x180795E1),
            (98, 321036, 0x1807AE83),
            (99, 332416, 0x18080571),
            (100, 333316, 0x180807F0),
            (101, 347396, 0x18087A4A),
            (102, 352390, 0x1808A0E7),
            (103, 355646, 0x1808B897),
            (104, 361828, 0x1808EB32),
            (105, 366404, 0x18090FF1),
            (106, 379252, 0x180984DA),
            (107, 382145, 0x18099B63),
            (108, 383465, 0x1809A27E),
            (109, 387964, 0x1809C961),
            (110, 391154, 0x1809E38A),
            (111, 404222, 0x180A6542),
            (112, 405674, 0x180A6E5B),
            (113, 408362, 0x180A84C3),
            (114, 408842, 0x180A8377),
            (115, 425330, 0x180B34B4),
            (116, 431378, 0x180B7423),
            (117, 432038, 0x180B74D9),
            (118, 434834, 0x180B8ECD),
            (119, 436790, 0x180B9EF1),
            (120, 438530, 0x180BAC92),
            (121, 439115, 0x180BAC67),
            (122, 441442, 0x180BC127),
            (123, 447487, 0x180C0390),
            (124, 448592, 0x180C09C5),
            (125, 498304, 0x180EA828),
            (126, 502776, 0x180EE2F0),
            (127, 521197, 0x180FFD6E),
            (128, 522796, 0x18100DE8),
            (129, 526410, 0x18103FEC),
            (130, 530141, 0x1810748A),
            (131, 531569, 0x18108296),
            (132, 546325, 0x181179C7),
            (133, 565071, 0x1812CBE8),
            (134, 571567, 0x18133F13),
            (135, 584839, 0x18143FF4),
            (136, 590005, 0x18149FAB),
            (137, 594317, 0x1814EEC8),
            (138, 609969, 0x18163C62),
            (139, 613511, 0x1816800D),
            (140, 624263, 0x18176F87),
            (141, 632933, 0x181834D4),
            (142, 637388, 0x18189542),
            (143, 642158, 0x1818FF54),
            (144, 642443, 0x1818F747),
            (145, 643238, 0x1818FC3A),
            (146, 646778, 0x18194807),
            (147, 652358, 0x1819CA80),
            (148, 655973, 0x181A1AA9),
            (149, 661703, 0x181AA584),
            (150, 664553, 0x181AE33B),
            (151, 664617, 0x181AD479),
            (152, 669209, 0x181B433E),
            (153, 674841, 0x181BD174),
            (154, 708505, 0x181FC36F),
            (155, 739113, 0x1823D4B2),
            (156, 739353, 0x1823C772),
            (157, 742537, 0x182426F4),
            (158, 750777, 0x1825473B),
            (159, 755449, 0x1825E474),
            (160, 765865, 0x18276A1C),
            (161, 769248, 0x1827DB4E),
            (162, 773821, 0x18287F27),
            (163, 778224, 0x18291E62),
            (164, 780417, 0x182961CD),
            (165, 781335, 0x18296F37),
            (166, 788067, 0x182A76ED),
            (167, 799542, 0x182C5C16),
            (168, 805781, 0x182D605C),
            (169, 808365, 0x182DBD45),
            (170, 844745, 0x1834CA94),
            (171, 847841, 0x1835526A),
            (172, 862457, 0x18386749),
            (173, 873401, 0x183ACAB9),
            (174, 877685, 0x183BAAC6),
            (175, 905531, 0x18429001),
            (176, 927653, 0x1848922A),
            (177, 940091, 0x184C1A3E),
            (178, 968711, 0x185525DE),
            (179, 969431, 0x1855306F),
            (180, 989123, 0x185BFA53),
            (181, 1000447, 0x1860050C),
            (182, 1017205, 0x18667131),
            (183, 1017832, 0x186673E0),
            (184, 1023285, 0x186876B9),
            (185, 1072514, 0x187EF4ED),
            (186, 1077758, 0x19008158),
            (187, 1139850, 0x1900A58C),
            (188, 1142529, 0x1900A6EF),
            (189, 1145930, 0x1900A8D1),
            (190, 1153150, 0x1900AD5B),
            (191, 1178550, 0x1900BF80),
            (192, 1212290, 0x1900DAB2),
            (193, 1224350, 0x1900E4FA),
            (194, 1226190, 0x1900E61E),
            (195, 1232090, 0x1900EB10),
            (196, 1267110, 0x19010DE3),
            (197, 1283310, 0x19011F55),
            (198, 1293170, 0x19012A37),
            (199, 1323730, 0x19015048),
            (200, 1335450, 0x19015FA0),
            (201, 1349835, 0x190173A3),
            (202, 1356723, 0x19017D1F),
            (203, 1367811, 0x19018D7D),
            (204, 1370457, 0x190190C2),
            (205, 1382385, 0x1901A35D),
            (206, 1382532, 0x1901A29A),
            (207, 1395447, 0x1901B7C8),
            (208, 1412289, 0x1901D55E),
            (209, 1426758, 0x1901F03A),
            (210, 1430475, 0x1901F679),
            (211, 1445633, 0x190214B8),
            (212, 1460989, 0x1902353D),
            (213, 1500523, 0x190294CC),
            (214, 1517155, 0x1902C0AE),
            (215, 1517639, 0x1902C05B),
            (216, 1545953, 0x1903132E),
            (217, 1550221, 0x19031ED6),
            (218, 1551211, 0x19032015),
            (219, 1579613, 0x19037E5F),
            (220, 1610897, 0x1903F383),
            (221, 1612967, 0x1903F97F),
            (222, 1619246, 0x190410F7),
            (223, 1627388, 0x190430FA),
            (224, 1682105, 0x19053535),
            (225, 1712235, 0x1905DCE8),
            (226, 1737236, 0x1906771C),
            (227, 1741951, 0x1906929D),
            (228, 1743055, 0x19069607),
            (229, 1748322, 0x1906B5DA),
            (230, 1750714, 0x1906C238),
            (231, 1758970, 0x1906F822),
            (232, 1768258, 0x19073761),
            (233, 1771042, 0x190747A0),
            (234, 1795834, 0x1908059C),
            (235, 1804978, 0x19084D48),
            (236, 1809322, 0x19086D7B),
            (237, 1831570, 0x19093166),
            (238, 1847938, 0x1909CB1E),
            (239, 1855258, 0x190A0F95),
            (240, 1907386, 0x190C5ED6),
            (241, 1949836, 0x190EA128),
            (242, 1950661, 0x190EA482),
            (243, 1999086, 0x1911BDDD),
            (244, 1999611, 0x1911BC7B),
            (245, 2039236, 0x1914BE10),
            (246, 2079961, 0x19185D54),
            (247, 2094461, 0x1919C29E),
            (248, 2097611, 0x191A0649),
            (249, 2101036, 0x191A522B),
            (250, 2113711, 0x191BA03B),
            (251, 2117767, 0x191C02EC),
            (252, 2178165, 0x19239BD8),
            (253, 2205725, 0x1927AD86),
            (254, 2207701, 0x1927E59F),
            (255, 2210379, 0x19283B3B),
            (256, 2210509, 0x192827B2),
            (257, 2233467, 0x192BEBE5),
            (258, 2235781, 0x192C398B),
            (259, 2259103, 0x1930720B),
            (260, 2276757, 0x1933DF20),
            (261, 2293254, 0x19374884),
            (262, 2296278, 0x1937D2B3),
            (263, 2344500, 0x194393F1),
            (264, 2345580, 0x1943B550),
            (265, 2348010, 0x1944351A),
            (266, 2353140, 0x19457594),
            (267, 2367045, 0x19494570),
            (268, 2368719, 0x1949966F),
            (269, 2371122, 0x194A1F48),
            (270, 2387214, 0x194EE076),
            (271, 2396566, 0x1951B169),
            (272, 2441730, 0x1961AE56),
            (273, 2442682, 0x1961D1E4),
            (274, 2445286, 0x19629BCE),
            (275, 2449710, 0x1964218B),
            (276, 2449850, 0x1963F1EA),
            (277, 2459398, 0x19679803),
            (278, 2480342, 0x197064EB),
            (279, 2501118, 0x1979DDE2),
            (280, 2529258, 0x1A00881C),
            (281, 2566610, 0x1A009DBF),
            (282, 2572700, 0x1A00A142),
            (283, 2588244, 0x1A00AB35),
            (284, 2662803, 0x1A00E650),
            (285, 2675041, 0x1A00F152),
            (286, 2700648, 0x1A010ACD),
            (287, 2717903, 0x1A011D42),
            (288, 2735999, 0x1A013202),
            (289, 2757401, 0x1A014CA0),
            (290, 2770480, 0x1A015DB3),
            (291, 2808340, 0x1A019610),
            (292, 2841280, 0x1A01CE41),
            (293, 2848930, 0x1A01DB83),
            (294, 2849140, 0x1A01DAC4),
            (295, 2866690, 0x1A01FC2E),
            (296, 2894770, 0x1A023777),
            (297, 2951140, 0x1A02C5C1),
            (298, 2965000, 0x1A02EC8E),
            (299, 2966470, 0x1A02EF2A),
            (300, 3021370, 0x1A03A5C8),
            (301, 3022486, 0x1A03A7B9),
            (302, 3076178, 0x1A0485FD),
            (303, 3108542, 0x1A05235E),
            (304, 3144626, 0x1A05EC96),
            (305, 3154050, 0x1A062332),
            (306, 3168930, 0x1A067FB4),
            (307, 3174727, 0x1A06A2B6),
            (308, 3194009, 0x1A0726CC),
            (309, 3198039, 0x1A074024),
            (310, 3251948, 0x1A08FB0B),
            (311, 3281516, 0x1A0A1665),
            (312, 3297996, 0x1A0ABFFC),
            (313, 3353100, 0x1A0D6062),
            (314, 3362636, 0x1A0DDD3D),
            (315, 3363084, 0x1A0DDB0F),
            (316, 3400876, 0x1A1015D4),
            (317, 3402284, 0x1A102334),
            (318, 3411148, 0x1A10AE90),
            (319, 3421132, 0x1A115289),
            (320, 3433132, 0x1A122246),
            (321, 3440524, 0x1A12A29C),
            (322, 3462040, 0x1A14441A),
            (323, 3485272, 0x1A163110),
            (324, 3497845, 0x1A1748CA),
            (325, 3534937, 0x1A1AF36A),
            (326, 3558994, 0x1A1D9BB2),
            (327, 3566980, 0x1A1E7FB0),
            (328, 3589750, 0x1A215657),
            (329, 3601366, 0x1A22D84E),
            (330, 3611464, 0x1A24331C),
            (331, 3630640, 0x1A27005F),
            (332, 3634244, 0x1A277974),
            (333, 3644274, 0x1A28FEC6),
            (334, 3648048, 0x1A29851A),
            (335, 3669604, 0x1A2D2986),
            (336, 3700476, 0x1A32FD66),
            (337, 3713260, 0x1A358A6D),
            (338, 3715878, 0x1A35F99D),
            (339, 3727404, 0x1A386444),
            (340, 3741990, 0x1A3BA512),
            (341, 3774890, 0x1A43E6C9),
            (342, 3781435, 0x1A458AB6),
            (343, 3806285, 0x1A4CA71D),
            (344, 3811360, 0x1A4E0A79),
            (345, 3822035, 0x1A51420E),
            (346, 3825535, 0x1A523539),
            (347, 3827355, 0x1A529C5C),
            (348, 3854830, 0x1A5C0463),
            (349, 3898195, 0x1A6D383C),
            (350, 3912300, 0x1A734B80),
            (351, 3950208, 0x1B0085EA),
            (352, 3961044, 0x1B008B89),
            (353, 3983004, 0x1B009807),
            (354, 3997008, 0x1B00A06D),
            (355, 4010472, 0x1B00A8E9),
            (356, 4014612, 0x1B00AB52),
            (357, 4019760, 0x1B00AE7B),
            (358, 4089168, 0x1B00E5E9),
            (359, 4112784, 0x1B00FC27),
            (360, 4114296, 0x1B00FD14),
            (361, 4145339, 0x1B011DFC),
            (362, 4153479, 0x1B0126C7),
            (363, 4174569, 0x1B014008),
            (364, 4182302, 0x1B014950),
            (365, 4220634, 0x1B017F21),
            (366, 4224741, 0x1B01848D),
            (367, 4253823, 0x1B01B386),
            (368, 4269326, 0x1B01CE56),
            (369, 4271694, 0x1B01D1A1),
            (370, 4278946, 0x1B01DE38),
            (371, 4279174, 0x1B01DD82),
            (372, 4293614, 0x1B01F8C8),
            (373, 4308852, 0x1B021754),
            (374, 4329448, 0x1B024417),
            (375, 4334464, 0x1B024E77),
            (376, 4338302, 0x1B025631),
            (377, 4386106, 0x1B02D2E3),
            (378, 4394732, 0x1B02EA8B),
            (379, 4430110, 0x1B035A31),
            (380, 4432276, 0x1B035F97),
            (381, 4455247, 0x1B03B0A1),
            (382, 4475488, 0x1B03FE19),
            (383, 4507312, 0x1B04869E),
            (384, 4581334, 0x1B06136E),
            (385, 4582816, 0x1B0618F2),
            (386, 4591474, 0x1B064C28),
            (387, 4691275, 0x1B096030),
            (388, 4711282, 0x1B0A227E),
            (389, 4722475, 0x1B0A92F5),
            (390, 4731289, 0x1B0AEDAF),
            (391, 4750409, 0x1B0BC599),
            (392, 4755569, 0x1B0BFD31),
            (393, 4770329, 0x1B0CB061),
            (394, 4796689, 0x1B0E119A),
            (395, 4818729, 0x1B0F5504),
            (396, 4841489, 0x1B10C22F),
            (397, 4843409, 0x1B10D8FE),
            (398, 4870889, 0x1B12C487),
            (399, 4872849, 0x1B12DED0),
            (400, 4883169, 0x1B139EEB),
            (401, 4899282, 0x1B14E128),
            (402, 4901086, 0x1B14FAF0),
            (403, 4923677, 0x1B16EAA0),
            (404, 4934460, 0x1B17DF22),
            (405, 4943603, 0x1B18B408),
            (406, 4953074, 0x1B1998C6),
            (407, 4996862, 0x1B1E6F81),
            (408, 5032655, 0x1B230DE3),
            (409, 5035033, 0x1B234E1D),
            (410, 5084643, 0x1B2AF93B),
            (411, 5087919, 0x1B2B704D),
            (412, 5121309, 0x1B318BC8),
            (413, 5124333, 0x1B3207B7),
            (414, 5135379, 0x1B342B18),
            (415, 5180277, 0x1B3E4EC8),
            (416, 5189937, 0x1B409D98),
            (417, 5190189, 0x1B408673),
            (418, 5245503, 0x1B505F7D),
            (419, 5263521, 0x1B562E80),
            (420, 5279859, 0x1B5BCEB9),
            (421, 5299080, 0x1B62EC4D),
            (422, 5305358, 0x1B6532E5),
            (423, 5319720, 0x1B6AEFA1),
            (424, 5352314, 0x1B79926B),
            (425, 5429757, 0x1C00A57C),
            (426, 5459470, 0x1C00B9FD),
            (427, 5511715, 0x1C00E4C3),
            (428, 5522508, 0x1C00EE4F),
            (429, 5637576, 0x1C017941),
            (430, 5641059, 0x1C017DA2),
            (431, 5665743, 0x1C01A44E),
            (432, 5667591, 0x1C01A668),
            (433, 5682771, 0x1C01BFD3),
            (434, 5696719, 0x1C01D873),
            (435, 5708775, 0x1C01EEAC),
            (436, 5798183, 0x1C02C276),
            (437, 5828367, 0x1C031B78),
            (438, 5837035, 0x1C03359A),
            (439, 5847859, 0x1C0357F3),
            (440, 5865591, 0x1C0394CD),
            (441, 5909466, 0x1C0442AD),
            (442, 5911896, 0x1C044ABA),
            (443, 5928726, 0x1C0494BA),
            (444, 5935476, 0x1C04B208),
            (445, 5968821, 0x1C055AA0),
            (446, 6009186, 0x1C0647B6),
            (447, 6036411, 0x1C06FCBA),
            (448, 6046716, 0x1C0743B5),
            (449, 6052611, 0x1C076B9E),
            (450, 6068721, 0x1C07E59A),
            (451, 6094389, 0x1C08BBAC),
            (452, 6106165, 0x1C092249),
            (453, 6108511, 0x1C0932B8),
            (454, 6131649, 0x1C0A1193),
            (455, 6136663, 0x1C0A3F96),
            (456, 6159847, 0x1C0B385A),
            (457, 6176913, 0x1C0BFC7A),
            (458, 6244165, 0x1C0FA85D),
            (459, 6253595, 0x1C1038F7),
            (460, 6258471, 0x1C1080E8),
            (461, 6268623, 0x1C112623),
            (462, 6331086, 0x1C15FAE5),
            (463, 6354351, 0x1C18129E),
            (464, 6373715, 0x1C19F3C1),
            (465, 6399236, 0x1C1CADA5),
            (466, 6408871, 0x1C1DBC7B),
            (467, 6430867, 0x1C206707),
            (468, 6491168, 0x1C292CE4),
            (469, 6561809, 0x1C36867C),
            (470, 6591936, 0x1C3D6125),
            (471, 6622896, 0x1C4555E2),
            (472, 6639984, 0x1C4A14E2),
            (473, 6646080, 0x1C4BBBD4),
            (474, 6651408, 0x1C4D2F1E),
            (475, 6665520, 0x1C517B3E),
            (476, 6701184, 0x1C5DC9DA),
            (477, 6704688, 0x1C5EE342),
            (478, 6737088, 0x1C6BC7F6),
            (479, 6773568, 0x1C7C75FC),
            (480, 6841536, 0x1D00A31A),
            (481, 6923954, 0x1D00E26D),
            (482, 6928315, 0x1D00E5DD),
            (483, 6929638, 0x1D00E688),
            (484, 6992799, 0x1D00FFFF),
            (485, 7002550, 0x1D00FFFF),
            (486, 7004314, 0x1D00FFFF),
            (487, 7092220, 0x1D00FFFF),
            (488, 7105891, 0x1D00FFFF),
            (489, 7125540, 0x1D00FFFF),
            (490, 7160183, 0x1D00FFFF),
            (491, 7216133, 0x1D00FFFF),
            (492, 7225483, 0x1D00FFFF),
            (493, 7284383, 0x1D00FFFF),
            (494, 7290233, 0x1D00FFFF),
            (495, 7293083, 0x1D00FFFF),
            (496, 7342783, 0x1D00FFFF),
            (497, 7386733, 0x1D00FFFF),
            (498, 7387783, 0x1D00FFFF),
            (499, 7420833, 0x1D00FFFF),
            (500, 7462333, 0x1D00FFFF),
        ]

        self.validate_blocksequence(1, 0, 0x1802AEE8, blocks)

    # A sequence of 300s blocks across signed 32-bit max integer height
    def test_sequence_300s_blocks_across_s32bit_max_integer_height(self):
        blocks = [
            (2147483643, 1234568190, 0x1802AE16),
            (2147483644, 1234568490, 0x1802AD44),
            (2147483645, 1234568790, 0x1802AC71),
            (2147483646, 1234569090, 0x1802AB9E),
            (2147483647, 1234569390, 0x1802AACD),
            (2147483648, 1234569690, 0x1802A9FA),
            (2147483649, 1234569990, 0x1802A929),
            (2147483650, 1234570290, 0x1802A858),
            (2147483651, 1234570590, 0x1802A787),
            (2147483652, 1234570890, 0x1802A6B7),
        ]

        self.validate_blocksequence(2147483642, 1234567290, 0x1802AEE8, blocks)

    # A sequence of 900s blocks across signed 64-bit max integer height and signed 32-bit max integer time
    def test_sequence_900s_blocks_across_s64bit_max_integer_height_and_s32bit_max_integer_time(
        self,
    ):
        blocks = [
            (9223372036854775803, 2147484547, 0x1802AFBB),
            (9223372036854775804, 2147485447, 0x1802B08F),
            (9223372036854775805, 2147486347, 0x1802B166),
            (9223372036854775806, 2147487247, 0x1802B23A),
            (9223372036854775807, 2147488147, 0x1802B30E),
            (9223372036854775808, 2147489047, 0x1802B3E5),
            (9223372036854775809, 2147489947, 0x1802B4BB),
            (9223372036854775810, 2147490847, 0x1802B592),
            (9223372036854775811, 2147491747, 0x1802B669),
            (9223372036854775812, 2147492647, 0x1802B73D),
        ]

        self.validate_blocksequence(9223372036854775802, 2147483047, 0x1802AEE8, blocks)


if __name__ == "__main__":
    unittest.main()
